-
Notifications
You must be signed in to change notification settings - Fork 13k
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
move rvalue checking to MIR #41232
move rvalue checking to MIR #41232
Conversation
r? @eddyb |
(rust_highfive has picked a reviewer for you, use r? to override) |
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.
r=me, with some clarifications.
let span = local_decl.source_info.span; | ||
let ty = local_decl.ty; | ||
if !ty.is_sized(self.tcx().global_tcx(), self.infcx.param_env(), span) { | ||
if let None = self.reported_errors.replace((ty, span)) { |
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.
replace
confuses me - insert
wouldn't work?
|
||
for (local, local_decl) in mir.local_decls.iter_enumerated() { | ||
self.check_local(mir, local, local_decl); | ||
} |
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.
Wait, can't there be assignments between, say, two dereferences? Is there any guarantee there would be a Local
? If so, a comment would be helpful.
@bors r=eddyb |
📌 Commit 540a069 has been approved by |
move rvalue checking to MIR
@arielb1 nice to see things moving to MIR :) |
No description provided.