about summary refs log tree commit diff
path: root/compiler/rustc_passes/src
diff options
context:
space:
mode:
authorAaron Hill <aa1ronham@gmail.com>2021-08-21 14:11:36 -0500
committerAaron Hill <aa1ronham@gmail.com>2021-08-21 14:11:36 -0500
commit62aea8c9134bcd66fe319010af2f9b9f39c3c887 (patch)
tree9e75990faa83da184c15b9cd1a0406776e9ccfb3 /compiler/rustc_passes/src
parent17aef21b30ad1534ab1372ead72a5cacea673442 (diff)
downloadrust-62aea8c9134bcd66fe319010af2f9b9f39c3c887.tar.gz
rust-62aea8c9134bcd66fe319010af2f9b9f39c3c887.zip
Address review comments
Diffstat (limited to 'compiler/rustc_passes/src')
-rw-r--r--compiler/rustc_passes/src/check_attr.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs
index 3009c2c3f2f..d0ddad1c1a3 100644
--- a/compiler/rustc_passes/src/check_attr.rs
+++ b/compiler/rustc_passes/src/check_attr.rs
@@ -130,6 +130,12 @@ impl CheckAttrVisitor<'tcx> {
                 sym::ignore | sym::should_panic | sym::proc_macro_derive => {
                     self.check_generic_attr(hir_id, attr, target, &[Target::Fn])
                 }
+                sym::automatically_derived => {
+                    self.check_generic_attr(hir_id, attr, target, &[Target::Impl])
+                }
+                sym::no_implicit_prelude => {
+                    self.check_generic_attr(hir_id, attr, target, &[Target::Mod])
+                }
                 _ => {}
             }
 
@@ -290,7 +296,6 @@ impl CheckAttrVisitor<'tcx> {
                 b.push_str(&(allowed_target.to_string() + "s"));
                 b
             });
-            //let supported_names = allowed_targets.iter().fold(String::new(), |msg, t| msg + ", " + &t.to_string());
             self.tcx.struct_span_lint_hir(UNUSED_ATTRIBUTES, hir_id, attr.span, |lint| {
                 lint.build(&format!("`#[{name}]` only has an effect on {}", supported_names))
                     .emit();