Skip to content

Commit 2083a12

Browse files
author
Samy Kacimi
committed
Normalize use of backticks in compiler messages for libsyntax/*
rust-lang#60532
1 parent 3ebca72 commit 2083a12

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

src/libsyntax/attr/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use std::iter;
3030
use std::ops::DerefMut;
3131

3232
pub fn mark_used(attr: &Attribute) {
33-
debug!("Marking {:?} as used.", attr);
33+
debug!("marking {:?} as used", attr);
3434
GLOBALS.with(|globals| {
3535
globals.used_attrs.lock().insert(attr.id);
3636
});
@@ -43,7 +43,7 @@ pub fn is_used(attr: &Attribute) -> bool {
4343
}
4444

4545
pub fn mark_known(attr: &Attribute) {
46-
debug!("Marking {:?} as known.", attr);
46+
debug!("marking {:?} as known", attr);
4747
GLOBALS.with(|globals| {
4848
globals.known_attrs.lock().insert(attr.id);
4949
});

src/libsyntax/error_codes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ beta compilers will not comply.
182182
Example of erroneous code (on a stable compiler):
183183
184184
```ignore (depends on release channel)
185-
#![feature(non_ascii_idents)] // error: #![feature] may not be used on the
185+
#![feature(non_ascii_idents)] // error: `#![feature]` may not be used on the
186186
// stable release channel
187187
```
188188

src/libsyntax/ext/expand.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
602602
None => return TokenStream::empty(),
603603
}
604604
self.cx.span_err(span, "custom attribute invocations must be \
605-
of the form #[foo] or #[foo(..)], the macro name must only be \
605+
of the form `#[foo]` or `#[foo(..)]`, the macro name must only be \
606606
followed by a delimiter token");
607607
TokenStream::empty()
608608
}

src/libsyntax/test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ fn get_test_runner(sd: &errors::Handler, krate: &ast::Crate) -> Option<ast::Path
414414
test_attr.meta_item_list().map(|meta_list| {
415415
if meta_list.len() != 1 {
416416
sd.span_fatal(test_attr.span,
417-
"#![test_runner(..)] accepts exactly 1 argument").raise()
417+
"`#![test_runner(..)]` accepts exactly 1 argument").raise()
418418
}
419419
match meta_list[0].meta_item() {
420420
Some(meta_item) if meta_item.is_word() => meta_item.path.clone(),

src/test/ui/proc-macro/proc-macro-gates.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ LL | #![empty_attr]
3434
= note: for more information, see https://github.com/rust-lang/rust/issues/54727
3535
= help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
3636

37-
error: custom attribute invocations must be of the form #[foo] or #[foo(..)], the macro name must only be followed by a delimiter token
37+
error: custom attribute invocations must be of the form `#[foo]` or `#[foo(..)]`, the macro name must only be followed by a delimiter token
3838
--> $DIR/proc-macro-gates.rs:21:1
3939
|
4040
LL | #[empty_attr = "y"]

0 commit comments

Comments
 (0)