about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSamy Kacimi <samy.kacimi@protonmail.ch>2019-07-23 20:03:20 +0200
committerSamy Kacimi <samy.kacimi@protonmail.ch>2019-07-23 20:03:20 +0200
commit2083a123a50e9939bab639d9f06b9ef4cdc3d3ed (patch)
tree73018d2db1e67d5ab399f3c5095e2801b3e54022
parent3ebca72a11869f946b31f900faffb75c2bb2473a (diff)
downloadrust-2083a123a50e9939bab639d9f06b9ef4cdc3d3ed.tar.gz
rust-2083a123a50e9939bab639d9f06b9ef4cdc3d3ed.zip
Normalize use of backticks in compiler messages for libsyntax/*
https://github.com/rust-lang/rust/issues/60532
-rw-r--r--src/libsyntax/attr/mod.rs4
-rw-r--r--src/libsyntax/error_codes.rs2
-rw-r--r--src/libsyntax/ext/expand.rs2
-rw-r--r--src/libsyntax/test.rs2
-rw-r--r--src/test/ui/proc-macro/proc-macro-gates.stderr2
5 files changed, 6 insertions, 6 deletions
diff --git a/src/libsyntax/attr/mod.rs b/src/libsyntax/attr/mod.rs
index a9f2429560a..7be21ff9029 100644
--- a/src/libsyntax/attr/mod.rs
+++ b/src/libsyntax/attr/mod.rs
@@ -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);
     });
@@ -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);
     });
diff --git a/src/libsyntax/error_codes.rs b/src/libsyntax/error_codes.rs
index e2d212eb721..029ce73498c 100644
--- a/src/libsyntax/error_codes.rs
+++ b/src/libsyntax/error_codes.rs
@@ -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
 ```
 
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs
index ae72f1fd108..14d573d07d0 100644
--- a/src/libsyntax/ext/expand.rs
+++ b/src/libsyntax/ext/expand.rs
@@ -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()
     }
diff --git a/src/libsyntax/test.rs b/src/libsyntax/test.rs
index d82cdce2ce9..2ada7104843 100644
--- a/src/libsyntax/test.rs
+++ b/src/libsyntax/test.rs
@@ -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(),
diff --git a/src/test/ui/proc-macro/proc-macro-gates.stderr b/src/test/ui/proc-macro/proc-macro-gates.stderr
index 8197bbd71fb..8462b564ec1 100644
--- a/src/test/ui/proc-macro/proc-macro-gates.stderr
+++ b/src/test/ui/proc-macro/proc-macro-gates.stderr
@@ -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"]