about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorJohn Renner <john@jrenner.net>2018-08-01 12:33:10 -0700
committerJohn Renner <john@jrenner.net>2018-08-01 12:33:10 -0700
commit77f9aca2a3e30eb430ba5a506261ff126c2d3077 (patch)
tree80c2b3db385e8f7e6e6499f49cd8932c2cd7eba7 /src/libsyntax
parentaf7ae2f278cb5f5b2d054d15dc36a39178a48b69 (diff)
downloadrust-77f9aca2a3e30eb430ba5a506261ff126c2d3077.tar.gz
rust-77f9aca2a3e30eb430ba5a506261ff126c2d3077.zip
Use the correct allow
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ext/expand.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs
index 590d8cd6c99..7a9422ef53d 100644
--- a/src/libsyntax/ext/expand.rs
+++ b/src/libsyntax/ext/expand.rs
@@ -1376,7 +1376,7 @@ impl<'a, 'b> Folder for InvocationCollector<'a, 'b> {
             // #[test] fn foo() {}
             // becomes:
             // #[test] pub fn foo_gensym(){}
-            // #[allow(dead_code)]
+            // #[allow(unused)]
             // use foo_gensym as foo;
             ast::ItemKind::Fn(..) if self.cx.ecfg.should_test => {
                 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> {
                         self.cx.path(item.ident.span,
                             vec![keywords::SelfValue.ident(), item.ident]));
 
-                    // #[allow(dead_code)] because the test function probably isn't being referenced
+                    // #[allow(unused)] because the test function probably isn't being referenced
                     use_item = use_item.map(|mut ui| {
                         ui.attrs.push(
                             self.cx.attribute(DUMMY_SP, attr::mk_list_item(DUMMY_SP,
                                 Ident::from_str("allow"), vec![
-                                    attr::mk_nested_word_item(Ident::from_str("dead_code"))
+                                    attr::mk_nested_word_item(Ident::from_str("unused"))
                                 ]
                             ))
                         );