Skip to content

Commit 77f9aca

Browse files
committed
Use the correct allow
1 parent af7ae2f commit 77f9aca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libsyntax/ext/expand.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1376,7 +1376,7 @@ impl<'a, 'b> Folder for InvocationCollector<'a, 'b> {
13761376
// #[test] fn foo() {}
13771377
// becomes:
13781378
// #[test] pub fn foo_gensym(){}
1379-
// #[allow(dead_code)]
1379+
// #[allow(unused)]
13801380
// use foo_gensym as foo;
13811381
ast::ItemKind::Fn(..) if self.cx.ecfg.should_test => {
13821382
if self.tests_nameable && item.attrs.iter().any(|attr| is_test_or_bench(attr)) {
@@ -1398,12 +1398,12 @@ impl<'a, 'b> Folder for InvocationCollector<'a, 'b> {
13981398
self.cx.path(item.ident.span,
13991399
vec![keywords::SelfValue.ident(), item.ident]));
14001400

1401-
// #[allow(dead_code)] because the test function probably isn't being referenced
1401+
// #[allow(unused)] because the test function probably isn't being referenced
14021402
use_item = use_item.map(|mut ui| {
14031403
ui.attrs.push(
14041404
self.cx.attribute(DUMMY_SP, attr::mk_list_item(DUMMY_SP,
14051405
Ident::from_str("allow"), vec![
1406-
attr::mk_nested_word_item(Ident::from_str("dead_code"))
1406+
attr::mk_nested_word_item(Ident::from_str("unused"))
14071407
]
14081408
))
14091409
);

0 commit comments

Comments
 (0)