mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-17 14:13:24 +03:00
Rollup merge of #62890 - fakenine:normalize_use_of_backticks_compiler_messages_p15, r=Centril
Normalize use of backticks in compiler messages for libsyntax/* https://github.com/rust-lang/rust/issues/60532
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
use std::ops::DerefMut;
|
||||
|
||||
pub fn mark_used(attr: &Attribute) {
|
||||
debug!("Marking {:?} as used.", attr);
|
||||
debug!("marking {:?} as used", attr);
|
||||
GLOBALS.with(|globals| {
|
||||
globals.used_attrs.lock().insert(attr.id);
|
||||
});
|
||||
@@ -43,7 +43,7 @@ pub fn is_used(attr: &Attribute) -> bool {
|
||||
}
|
||||
|
||||
pub fn mark_known(attr: &Attribute) {
|
||||
debug!("Marking {:?} as known.", attr);
|
||||
debug!("marking {:?} as known", attr);
|
||||
GLOBALS.with(|globals| {
|
||||
globals.known_attrs.lock().insert(attr.id);
|
||||
});
|
||||
|
||||
@@ -182,7 +182,7 @@ struct MyStruct {
|
||||
Example of erroneous code (on a stable compiler):
|
||||
|
||||
```ignore (depends on release channel)
|
||||
#![feature(non_ascii_idents)] // error: #![feature] may not be used on the
|
||||
#![feature(non_ascii_idents)] // error: `#![feature]` may not be used on the
|
||||
// stable release channel
|
||||
```
|
||||
|
||||
|
||||
@@ -602,7 +602,7 @@ fn extract_proc_macro_attr_input(&self, tokens: TokenStream, span: Span) -> Toke
|
||||
None => return TokenStream::empty(),
|
||||
}
|
||||
self.cx.span_err(span, "custom attribute invocations must be \
|
||||
of the form #[foo] or #[foo(..)], the macro name must only be \
|
||||
of the form `#[foo]` or `#[foo(..)]`, the macro name must only be \
|
||||
followed by a delimiter token");
|
||||
TokenStream::empty()
|
||||
}
|
||||
|
||||
@@ -414,7 +414,7 @@ fn get_test_runner(sd: &errors::Handler, krate: &ast::Crate) -> Option<ast::Path
|
||||
test_attr.meta_item_list().map(|meta_list| {
|
||||
if meta_list.len() != 1 {
|
||||
sd.span_fatal(test_attr.span,
|
||||
"#![test_runner(..)] accepts exactly 1 argument").raise()
|
||||
"`#![test_runner(..)]` accepts exactly 1 argument").raise()
|
||||
}
|
||||
match meta_list[0].meta_item() {
|
||||
Some(meta_item) if meta_item.is_word() => meta_item.path.clone(),
|
||||
|
||||
@@ -34,7 +34,7 @@ LL | #![empty_attr]
|
||||
= note: for more information, see https://github.com/rust-lang/rust/issues/54727
|
||||
= help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
|
||||
|
||||
error: custom attribute invocations must be of the form #[foo] or #[foo(..)], the macro name must only be followed by a delimiter token
|
||||
error: custom attribute invocations must be of the form `#[foo]` or `#[foo(..)]`, the macro name must only be followed by a delimiter token
|
||||
--> $DIR/proc-macro-gates.rs:21:1
|
||||
|
|
||||
LL | #[empty_attr = "y"]
|
||||
|
||||
Reference in New Issue
Block a user