Skip to content

Commit 779fe95

Browse files
authored
Rollup merge of #124926 - Alexendoo:feature-maybe-incorrect, r=est31
Make `#![feature]` suggestion MaybeIncorrect Fixes rust-lang/rust-clippy#12784 The `unstable_name_collisions` lint uses `disabled_nightly_features` to mention the feature name, but accepting the suggestion would result in an ambiguity error There are other calls where accepting the feature gate would fix code when ran with `cargo fix --broken-code`, though it's not always desirable to add a feature gate even if the user is currently on nightly so MaybeIncorrect seems appropriate
2 parents a40fa8f + 3c52553 commit 779fe95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_middle/src/ty/context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2449,7 +2449,7 @@ impl<'tcx> TyCtxt<'tcx> {
24492449
span,
24502450
msg,
24512451
format!("#![feature({feature})]\n"),
2452-
Applicability::MachineApplicable,
2452+
Applicability::MaybeIncorrect,
24532453
);
24542454
} else {
24552455
diag.help(msg);

0 commit comments

Comments
 (0)