about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc/lint/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc/lint/mod.rs b/src/librustc/lint/mod.rs
index b3fc5612ba5..c01b0ae2ccc 100644
--- a/src/librustc/lint/mod.rs
+++ b/src/librustc/lint/mod.rs
@@ -725,7 +725,7 @@ pub fn maybe_lint_level_root(tcx: TyCtxt<'_, '_, '_>, id: hir::HirId) -> bool {
     let attrs = tcx.hir().attrs_by_hir_id(id);
     for attr in attrs {
         if Level::from_str(&attr.name().as_str()).is_some() {
-            true;
+            return true;
         }
     }
     false