Skip to content

Commit

Permalink
Normalize use of backticks in compiler messages for libsyntax/*
Browse files Browse the repository at this point in the history
  • Loading branch information
Samy Kacimi committed Jul 23, 2019
1 parent 3ebca72 commit 2083a12
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
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

0 comments on commit 2083a12

Please sign in to comment.