about summary refs log tree commit diff
path: root/src/libsyntax_ext
diff options
context:
space:
mode:
authorSamy Kacimi <samy.kacimi@protonmail.ch>2019-07-15 21:54:58 +0200
committerSamy Kacimi <samy.kacimi@protonmail.ch>2019-07-15 23:11:29 +0200
commita36763af8a2015566c94a1c0ca6376a24a2355e6 (patch)
treef3395d3b5846fdd7624307fad21924525940f65c /src/libsyntax_ext
parent4b65a86ebace8600c8e269e8bfe3365cdc460e68 (diff)
normalize use of backticks in compiler messages for libsyntax_ext
https://github.com/rust-lang/rust/issues/60532
Diffstat (limited to 'src/libsyntax_ext')
-rw-r--r--src/libsyntax_ext/deriving/clone.rs2
-rw-r--r--src/libsyntax_ext/test.rs6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax_ext/deriving/clone.rs b/src/libsyntax_ext/deriving/clone.rs
index b3b6328e2ca..9a890a06e03 100644
--- a/src/libsyntax_ext/deriving/clone.rs
+++ b/src/libsyntax_ext/deriving/clone.rs
@@ -73,7 +73,7 @@ pub fn expand_deriving_clone(cx: &mut ExtCtxt<'_>,
             }
         }
 
-        _ => cx.span_bug(span, "#[derive(Clone)] on trait item or impl item"),
+        _ => cx.span_bug(span, "`#[derive(Clone)]` on trait item or impl item"),
     }
 
     let inline = cx.meta_word(span, sym::inline);
diff --git a/src/libsyntax_ext/test.rs b/src/libsyntax_ext/test.rs
index c5c5ef57b31..4386fe8cfa2 100644
--- a/src/libsyntax_ext/test.rs
+++ b/src/libsyntax_ext/test.rs
@@ -42,12 +42,12 @@ pub fn expand_test_or_bench(
         if let Annotatable::Item(i) = item { i }
         else {
             cx.parse_sess.span_diagnostic.span_fatal(item.span(),
-                "#[test] attribute is only allowed on non associated functions").raise();
+                "`#[test]` attribute is only allowed on non associated functions").raise();
         };
 
     if let ast::ItemKind::Mac(_) = item.node {
         cx.parse_sess.span_diagnostic.span_warn(item.span,
-            "#[test] attribute should not be used on macros. Use #[cfg(test)] instead.");
+            "`#[test]` attribute should not be used on macros. Use `#[cfg(test)]` instead.");
         return vec![Annotatable::Item(item)];
     }
 
@@ -167,7 +167,7 @@ pub fn expand_test_or_bench(
         ast::ItemKind::ExternCrate(Some(sym::test))
     );
 
-    log::debug!("Synthetic test item:\n{}\n", pprust::item_to_string(&test_const));
+    log::debug!("synthetic test item:\n{}\n", pprust::item_to_string(&test_const));
 
     vec![
         // Access to libtest under a gensymed name