Add comment about unfulfilled_lint_expectation not being in a group (RFC 2383)

This commit is contained in:
xFrednet 2022-03-09 21:58:13 +01:00
parent d39d60971b
commit be84049570
No known key found for this signature in database
GPG Key ID: FCDCBF29AF64D601

View File

@ -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,