diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2024-11-20 01:54:25 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-20 01:54:25 -0500 |
| commit | a175db1424ea80b6df6e85331c011ebb8d07d5aa (patch) | |
| tree | b169eb31f89c452aa97e63277b54f40f62641bb5 /compiler/rustc_middle/src | |
| parent | 25dc4d0394df6ca1d4f3637aa4c1fad8c25833ab (diff) | |
| parent | df94818366648595e9cf6fa4fa7d061a5adfd780 (diff) | |
| download | rust-a175db1424ea80b6df6e85331c011ebb8d07d5aa.tar.gz rust-a175db1424ea80b6df6e85331c011ebb8d07d5aa.zip | |
Rollup merge of #133108 - RalfJung:future-compat-needs-to-run, r=lcnr
lints_that_dont_need_to_run: never skip future-compat-reported lints Follow-up to https://github.com/rust-lang/rust/pull/125116: future-compat lints show up with `--json=future-incompat` even if they are otherwise allowed in the crate. So let's ensure we do not skip those as part of the `lints_that_dont_need_to_run` logic. I could not find a current future compat lint that is emitted by a lint pass, so there's no clear way to add a test for this. Cc `@blyxyas` `@cjgillot`
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/lint.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/compiler/rustc_middle/src/lint.rs b/compiler/rustc_middle/src/lint.rs index 92ba6ceee93..971d036fa69 100644 --- a/compiler/rustc_middle/src/lint.rs +++ b/compiler/rustc_middle/src/lint.rs @@ -290,12 +290,7 @@ pub fn lint_level( let has_future_breakage = future_incompatible.map_or( // Default allow lints trigger too often for testing. sess.opts.unstable_opts.future_incompat_test && lint.default_level != Level::Allow, - |incompat| { - matches!( - incompat.reason, - FutureIncompatibilityReason::FutureReleaseErrorReportInDeps - ) - }, + |incompat| incompat.reason.has_future_breakage(), ); // Convert lint level to error level. |
