-
Notifications
You must be signed in to change notification settings - Fork 13.4k
ambiguous_wide_pointer_comparisons: bad suggestion #121330
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Same problem with
|
@rustbot claim |
@matthiaskrgr @jieyouxu I think this is a known issue with |
Well we can either remove one of the suggestions or make the lint MaybeIncorrect or something? |
I think this is #53934.
We can't remove one of the suggestions, they are both necessary. We can however make them |
That is indeed unfortunate. |
Rollup merge of rust-lang#121338 - jieyouxu:ambiguous_wide_pointer_comparisons_suggestion, r=Nadrieril Downgrade ambiguous_wide_pointer_comparisons suggestions to MaybeIncorrect In certain cases like rust-lang#121330, it is possible to have more than one suggestion from the `ambiguous_wide_pointer_comparisons` lint (which before this PR are `MachineApplicable`). When this gets passed to rustfix, rustfix makes *multiple* changes according to the suggestions which result in incorrect code. This is a temporary workaround. The real long term solution to problems like these is to address <rust-lang#53934>. This PR also includes a drive-by edit to the panic message emitted by compiletest because "ui" test suite now uses `//`@`` directives. Fixes rust-lang#121330.
Uh oh!
There was an error while loading. Please reload this page.
Code
Current output
Desired output
No response
Rationale and extra context
The lint is marked
cargo-fix
able but applying the suggestion fails:Other cases
No response
Rust Version
Anything else?
No response
The text was updated successfully, but these errors were encountered: