about summary refs log tree commit diff
path: root/compiler/rustc_lint/src
diff options
context:
space:
mode:
authorxFrednet <xFrednet@gmail.com>2022-03-03 22:28:56 +0100
committerxFrednet <xFrednet@gmail.com>2022-03-03 23:21:41 +0100
commit700ec66aed90f446a2d09b6fc96599b1f8099057 (patch)
tree9da7d504ee0356630423c048c23a216fd9db37b9 /compiler/rustc_lint/src
parent10913c00018c76103b2fd4260d8c02ec728fd244 (diff)
downloadrust-700ec66aed90f446a2d09b6fc96599b1f8099057.tar.gz
rust-700ec66aed90f446a2d09b6fc96599b1f8099057.zip
Emit `unused_attributes` if a level attr only has a reason
Diffstat (limited to 'compiler/rustc_lint/src')
-rw-r--r--compiler/rustc_lint/src/levels.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_lint/src/levels.rs b/compiler/rustc_lint/src/levels.rs
index f46f74fa45f..bbfbf61f486 100644
--- a/compiler/rustc_lint/src/levels.rs
+++ b/compiler/rustc_lint/src/levels.rs
@@ -258,7 +258,7 @@ impl<'s> LintLevelsBuilder<'s> {
             };
 
             if metas.is_empty() {
-                // FIXME (#55112): issue unused-attributes lint for `#[level()]`
+                // This emits the unused_attributes lint for `#[level()]`
                 continue;
             }
 
@@ -271,8 +271,6 @@ impl<'s> LintLevelsBuilder<'s> {
                     ast::MetaItemKind::Word => {} // actual lint names handled later
                     ast::MetaItemKind::NameValue(ref name_value) => {
                         if item.path == sym::reason {
-                            // FIXME (#55112): issue unused-attributes lint if we thereby
-                            // don't have any lint names (`#[level(reason = "foo")]`)
                             if let ast::LitKind::Str(rationale, _) = name_value.kind {
                                 if !self.sess.features_untracked().lint_reasons {
                                     feature_err(