File tree 1 file changed +5
-5
lines changed
compiler/rustc_errors/src
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 {
135
135
let data: Vec < FutureBreakageItem < ' _ > > = diags
136
136
. into_iter ( )
137
137
. 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.
143
143
if matches ! ( diag. level, crate :: Level :: Allow | crate :: Level :: Expect ( ..) ) {
144
144
diag. level = crate :: Level :: Warning ;
145
145
}
You can’t perform that action at this time.
0 commit comments