File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
compiler/rustc_errors/src Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -135,11 +135,11 @@ impl Emitter for JsonEmitter {
135135 let data: Vec < FutureBreakageItem < ' _ > > = diags
136136 . into_iter ( )
137137 . map ( |mut diag| {
138- // The `FutureBreakageItem` is collected and serialized.
139- // However, the `allow` and `expect` lint levels can't usually
140- // be serialized. The lint level is overwritten to allow the
141- // serialization again and force a lint emission.
142- // (This is an educated guess. I didn't originally add this)
138+ // Allowed or expected lints don't normally (by definition) emit a lint
139+ // but future incompat lints are special and are emitted anyway.
140+ //
141+ // So to avoid ICEs and confused users we "upgrade" the lint level for
142+ // those `FutureBreakageItem` to warn.
143143 if matches ! ( diag. level, crate :: Level :: Allow | crate :: Level :: Expect ( ..) ) {
144144 diag. level = crate :: Level :: Warning ;
145145 }
You can’t perform that action at this time.
0 commit comments