}
}
- _ => 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);
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)];
}
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
-warning: #[test] attribute should not be used on macros. Use #[cfg(test)] instead.
+warning: `#[test]` attribute should not be used on macros. Use `#[cfg(test)]` instead.
--> $DIR/test-on-macro.rs:11:1
|
LL | foo!();