-
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
[WIP] Preliminary work splitting const qualification into separate passes #52518
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
@@ -101,7 +101,9 @@ struct Qualifier<'a, 'gcx: 'a+'tcx, 'tcx: 'a> { | |||
rpo: ReversePostorder<'a, 'tcx>, | |||
tcx: TyCtxt<'a, 'gcx, 'tcx>, | |||
param_env: ty::ParamEnv<'tcx>, | |||
local_qualif: IndexVec<Local, Option<Qualif>>, |
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.
The commit message isn't up to date anymore. The temp + return merge is already in master
src/librustc/mir/interpret/error.rs
Outdated
@@ -175,6 +176,7 @@ pub enum EvalErrorKind<'tcx, O> { | |||
NoMirFor(String), | |||
UnterminatedCString(Pointer), | |||
DanglingPointerDeref, | |||
ExternStaticRead(DefId), |
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.
This is introduced here and removed two commits later. Merge the commits into each other?
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
r? @eddyb |
d3af745
to
55e384f
Compare
This comment has been minimized.
This comment has been minimized.
let store = |this: &mut Self, index| { | ||
this.local_mut_interior.set_member(&index, this.qualif.mut_interior); | ||
this.local_needs_drop.set_member(&index, this.qualif.needs_drop); | ||
this.local_not_const.set_member(&index, this.qualif.not_const); | ||
}; | ||
|
||
// Only handle promotable temps in non-const functions. | ||
if self.mode == Mode::Fn { | ||
if let Place::Local(index) = *dest { | ||
if self.mir.local_kind(index) == LocalKind::Temp |
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.
I believe the failure here is due to this not also entering this arm in case of LocalKind::ReturnPointer
. Although I don't see how that worked before!?
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
… vectors for qualif flags.
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Ping from triage, @alexreg. It looks like some changes have been requested to your PR. |
@TimNN Yeah, I was away on holiday, but just getting to them now. Hopefully will have them resolved in the next day or two. :-) |
Triage: @alexreg Hope you had a good holiday. Can you give a status update on this PR? |
It looks like @eddyb is needed: #49146 (comment) |
@mark-i-m Thank you, I've updated the status of the PR to reflect this. |
@Aaronepower Yep. I've been pestering @eddyb about this for a while. I think he'll finally get around to it soon. :-) |
Ping from triage @eddyb! This PR needs your review. |
Ping from triage @eddyb / @rust-lang/compiler: This PR requires your review. |
1 similar comment
Ping from triage @eddyb / @rust-lang/compiler: This PR requires your review. |
Conflict ahead: #54424 |
Ping from triage @eddyb / @rust-lang/compiler: What are your plans for this PR? |
Side note: please do not leave merge commits in the PR. |
@estebank That's a rebase gone wrong I think. :-P |
Ping from triage @eddyb: This PR requires your review! |
Ping from triage @eddyb / @rust-lang/compiler! This PR requires your review. |
Ping from triage @eddyb / @rust-lang/compiler -- we are eagerly awaiting your review. |
r? @eddyb
CC @oli-obk