Allow tool-lints to specify a feature-gate too

This commit is contained in:
Wim Looman 2022-09-12 20:08:58 +02:00
parent 7f115e3cd2
commit fd1a399c4f
No known key found for this signature in database
GPG key ID: C6F5748C6DD1607B
2 changed files with 11 additions and 5 deletions

View file

@ -440,8 +440,10 @@ impl<'s> LintLevelsBuilder<'s> {
sp,
reason,
);
for id in ids {
self.insert_spec(*id, (level, src));
for &id in ids {
if self.check_gated_lint(id, attr.span) {
self.insert_spec(id, (level, src));
}
}
if let Level::Expect(expect_id) = level {
self.lint_expectations.push((