-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix rustc breaking change: convert to Place's new boxed slice projection #4540
Conversation
Fixes breaking change from rust-lang PR rust-lang/rust#63420
Made some comments but I was confused, this looks perfect and changes doesn't change semantics. Good to merge. |
I can't claim any knowledge either here, but given @spastorino's approval and that there's no visible regressions I'm gonna @bors r+ Thanks! |
📌 Commit 80822b4 has been approved by |
Fix rustc breaking change: convert to Place's new boxed slice projection Addressed breaking changes from rust-lang PR rust-lang/rust#63420 I'm not entirely sure the semantics are preserved as I don't have much knowledge about MIR yet. So this code was largely reverse-engineered from the PR above. I wouldn't be surprised if I did something wrong :). I followed the instructions to pull latest rustc from master and verified the build break I was seeing in my PR for cast-lossless in Travis CI. With these changes, it compiles again and all tests pass. Fixes rust-lang/rust#64440 changelog: none
@@ -303,7 +302,7 @@ fn base_local_and_movability<'tcx>( | |||
mut projection, | |||
} = place.as_ref(); | |||
if let PlaceBase::Local(local) = place_base { | |||
while let Some(box Projection { base, elem }) = projection { | |||
while let [base @ .., elem] = projection { | |||
projection = base; |
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.
Whoa! 🤯
☀️ Test successful - checks-travis, status-appveyor |
Addressed breaking changes from rust-lang PR rust-lang/rust#63420
I'm not entirely sure the semantics are preserved as I don't have much knowledge about MIR yet. So this code was largely reverse-engineered from the PR above. I wouldn't be surprised if I did something wrong :).
I followed the instructions to pull latest rustc from master and verified the build break I was seeing in my PR for cast-lossless in Travis CI. With these changes, it compiles again and all tests pass.
Fixes rust-lang/rust#64440
changelog: none