about summary refs log tree commit diff
diff options
context:
space:
mode:
authorxFrednet <xFrednet@gmail.com>2022-03-09 21:58:13 +0100
committerxFrednet <xFrednet@gmail.com>2022-03-09 21:58:13 +0100
commitbe84049570d5be6d6e76e471ef88a11ae46292ad (patch)
treef89ac7bdb6c58f53d099119ddbc0f166d9672ba9
parentd39d60971bafe34f626585e4887e7eec726fe972 (diff)
downloadrust-be84049570d5be6d6e76e471ef88a11ae46292ad.tar.gz
rust-be84049570d5be6d6e76e471ef88a11ae46292ad.zip
Add comment about `unfulfilled_lint_expectation` not being in a group (RFC 2383)
-rw-r--r--compiler/rustc_lint/src/levels.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_lint/src/levels.rs b/compiler/rustc_lint/src/levels.rs
index 468aacc9bca..99bbe01566a 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,