-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
borrowck: name the correct type in error message #43993
Conversation
But this error also occurs for arrays: fn main() {
let x = [Box::new(0)][0];
}
|
r? @arielb1 -- I'm not familiar with this area of the code, perhaps you could suggest how to differentiate between slices and arrays? |
The type is available right here on |
33d479f
to
a9c85d3
Compare
This should be good to go. |
span_bug!(move_from.span, "this path should not cause illegal move"); | ||
} | ||
} | ||
let type_name = match &b.ty.sty { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you maintain the bug!
on b.ty.sty == ty::TyArray
and ik == Kind::Pattern
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, done.
a9c85d3
to
c1ed862
Compare
@bors r+ rollup |
📌 Commit c1ed862 has been approved by |
borrowck: name the correct type in error message Closes rust-lang#36407. r? @Mark-Simulacrum
Closes #36407.
r? @Mark-Simulacrum