about summary refs log tree commit diff
path: root/compiler/rustc_lint
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_lint')
-rw-r--r--compiler/rustc_lint/src/expect.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/rustc_lint/src/expect.rs b/compiler/rustc_lint/src/expect.rs
index 49664322a98..db0756f5f54 100644
--- a/compiler/rustc_lint/src/expect.rs
+++ b/compiler/rustc_lint/src/expect.rs
@@ -16,11 +16,9 @@ pub fn check_expectations(tcx: TyCtxt<'_>) {
         &tcx.lint_levels(()).lint_expectations;
 
     for (id, expectation) in lint_expectations {
-        if fulfilled_expectations.contains(id) {
-            continue;
+        if !fulfilled_expectations.contains(id) {
+            emit_unfulfilled_expectation_lint(tcx, expectation);
         }
-
-        emit_unfulfilled_expectation_lint(tcx, expectation);
     }
 }