Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalize use of backticks in compiler messages for libsyntax/* #62890

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/libsyntax/attr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use std::iter;
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);
});
Expand All @@ -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);
});
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/error_codes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ beta compilers will not comply.
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
```

Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/ext/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
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()
}
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/proc-macro/proc-macro-gates.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down