From be84049570d5be6d6e76e471ef88a11ae46292ad Mon Sep 17 00:00:00 2001 From: xFrednet Date: Wed, 9 Mar 2022 21:58:13 +0100 Subject: [PATCH] Add comment about `unfulfilled_lint_expectation` not being in a group (RFC 2383) --- compiler/rustc_lint/src/levels.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/rustc_lint/src/levels.rs b/compiler/rustc_lint/src/levels.rs index 468aacc9bcaa..99bbe01566a9 100644 --- a/compiler/rustc_lint/src/levels.rs +++ b/compiler/rustc_lint/src/levels.rs @@ -357,6 +357,8 @@ impl<'s> LintLevelsBuilder<'s> { // can't be fulfilled. The lint message will include an explanation, that the // `unfulfilled_lint_expectations` lint can't be expected. if let Level::Expect(expect_id) = level { + // The `unfulfilled_lint_expectations` lint is not part of any lint groups. Therefore. we + // only need to check the slice if it contains a single lint. let is_unfulfilled_lint_expectations = match ids { [lint] => *lint == LintId::of(UNFULFILLED_LINT_EXPECTATIONS), _ => false,