diff options
Diffstat (limited to 'src/libsyntax_ext')
| -rw-r--r-- | src/libsyntax_ext/deriving/clone.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax_ext/test.rs | 6 |
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