-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ICE when invoking cargo clippy --fix
#12784
Comments
Not sure if its useful but I initially encountered this at an earlier version. ICE still present after updating.
|
Reproduced this at home, on a fairly minimum project, using the same compiler version (besides the host triple: Project contents: src/main.rs:
rust-toolchain.toml:
Cargo.toml:
Cargo.lock:
|
My read is that I don't know if that alone is enough to cause an ICE, or if it's deeper than that. |
Yeah the fixed code failing to compile is enough to produce that error, the problem here is the rustc lint suggests adding the feature gate as a machine applicable suggestion |
Rollup merge of rust-lang#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
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
Summary
I encountered an ICE when invoking
cargo clippy --fix
Version
Error output
Backtrace
The text was updated successfully, but these errors were encountered: