diff options
| author | The Miri Cronjob Bot <miri@cron.bot> | 2024-06-27 05:01:59 +0000 |
|---|---|---|
| committer | The Miri Cronjob Bot <miri@cron.bot> | 2024-06-27 05:01:59 +0000 |
| commit | a4e601ff404e4be40e8ddbe9fc59f4f2f4e47cd6 (patch) | |
| tree | 54b52616144ebe1fdda8f1db2ea516c9a4617aae /compiler/rustc_errors/src | |
| parent | c8a89b05533e7fcec0866e0a25424f94afed93a0 (diff) | |
| parent | 7033f9b14a37f4a00766d6c01326600b31f3a716 (diff) | |
| download | rust-a4e601ff404e4be40e8ddbe9fc59f4f2f4e47cd6.tar.gz rust-a4e601ff404e4be40e8ddbe9fc59f4f2f4e47cd6.zip | |
Merge from rustc
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/json.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/rustc_errors/src/json.rs b/compiler/rustc_errors/src/json.rs index af82d8092c2..764134d5335 100644 --- a/compiler/rustc_errors/src/json.rs +++ b/compiler/rustc_errors/src/json.rs @@ -135,7 +135,12 @@ impl Emitter for JsonEmitter { let data: Vec<FutureBreakageItem<'_>> = diags .into_iter() .map(|mut diag| { - if diag.level == crate::Level::Allow { + // Allowed or expected lints don't normally (by definition) emit a lint + // but future incompat lints are special and are emitted anyway. + // + // So to avoid ICEs and confused users we "upgrade" the lint level for + // those `FutureBreakageItem` to warn. + if matches!(diag.level, crate::Level::Allow | crate::Level::Expect(..)) { diag.level = crate::Level::Warning; } FutureBreakageItem { |
