-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
quick fix only applies one half of the proposed fix from clippy, wont compile anymore after doing the quick fix #17163
Comments
|
Oops, after reviewing the implementation of |
fix: merge multiple suggestions into a single multi-span suggestion in `needless_late_init` See rust-lang/rust-analyzer#17163 (comment). Currently, the fix for `needless_late_init` would modify multiple parts in the file. However, these modifications are exported as separate suggestions instead of a unified 'multi-part suggestion'. Consequently, rust-analyzer is unable to perform the fix correctly when applying suggestions automatically, as only one suggestion is processed at a time. This PR addresses this issue by merge all modifications into a single multi-part suggestion. changelog: [`needless_late_init`]: merge multiple fixes into a single multi-span fix.
I believe rust-lang/rust-clippy#12777 has fixed it. |
The PR has been merged into Clippy, but it hasn't been merged upstream yet. |
oh ok, is there a use to clippy nightly releases then? |
The clippy component in the rustup toolchain is whatever was synced back into rust-lang/rust last. They don't do it every day. |
oh right i see, thanks for clarifying, i found this merge there, which includes the pr that closed this |
rust-analyzer version: rust-analyzer version: 0.4.1939-standalone
rustc version: rustc 1.77.0 (aedd173a2 2024-03-17)
editor or extension: code OSS (open core of vscode)
relevant settings: i use cargo clippy instead of cargo check, to get clippy suggestions in the editor, this is relevant for reproducing this
code snippet to reproduce:
apply one of the the two parts from the suggested quick fix
this is not a clippy bug, auto-fixing it with clippy will apply both parts
The text was updated successfully, but these errors were encountered: