File tree 1 file changed +7
-5
lines changed
compiler/rustc_middle/src
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -272,11 +272,13 @@ pub fn struct_lint_level<'s, 'd>(
272
272
// emit shouldn't be automatically fixed by rustfix.
273
273
err. allow_suggestions ( false ) ;
274
274
275
- // If this is a future incompatible lint it'll become a hard error, so
276
- // we have to emit *something*. Also, if this lint occurs in the
277
- // expansion of a macro from an external crate, allow individual lints
278
- // to opt-out from being reported.
279
- if future_incompatible. is_none ( ) && !lint. report_in_external_macro {
275
+ // If this is a future incompatible that is not an edition fixing lint
276
+ // it'll become a hard error, so we have to emit *something*. Also,
277
+ // if this lint occurs in the expansion of a macro from an external crate,
278
+ // allow individual lints to opt-out from being reported.
279
+ let not_future_incompatible =
280
+ future_incompatible. map ( |f| f. edition . is_some ( ) ) . unwrap_or ( true ) ;
281
+ if not_future_incompatible && !lint. report_in_external_macro {
280
282
err. cancel ( ) ;
281
283
// Don't continue further, since we don't want to have
282
284
// `diag_span_note_once` called for a diagnostic that isn't emitted.
You can’t perform that action at this time.
0 commit comments