-
Notifications
You must be signed in to change notification settings - Fork 13.4k
ICE when trying to assign to unsafe pointer #9706
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
Comments
I think this is not related to unsafe pointer,rather to assigning to a value, eg return anything |
It appears that @bmaxa is correct, this code also ICEs fn foo() -> int { 3 }
fn main() {
foo() = 3;
} It appears the typechecker ensures that the lhs and rhs have the same type, but not that the lhs is actually an assignable location... |
Seems like dup of #7507. |
Agreed. |
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
Nov 21, 2022
Fix `bool_to_int_with_if` false positive with `if let` Fixes rust-lang#9706 changelog: FP: [`bool_to_int_with_if`]: Now ignores `if let` statements
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: