normalize use of backticks in compiler messages for libsyntax_ext

https://github.com/rust-lang/rust/issues/60532
This commit is contained in:
Samy Kacimi
2019-07-15 21:54:58 +02:00
parent 4b65a86eba
commit a36763af8a
5 changed files with 7 additions and 7 deletions

View File

@@ -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