Skip to content
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

Merged
merged 1 commit into from
Sep 14, 2019
Merged

Fix rustc breaking change: convert to Place's new boxed slice projection #4540

merged 1 commit into from
Sep 14, 2019

Conversation

jolson88
Copy link
Contributor

@jolson88 jolson88 commented Sep 14, 2019

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

@jolson88 jolson88 changed the title Fix rustc brekaing change: convert to Place's new boxed slice projection Fix rustc breaking change: convert to Place's new boxed slice projection Sep 14, 2019
@spastorino
Copy link
Member

Made some comments but I was confused, this looks perfect and changes doesn't change semantics. Good to merge.

@phansch
Copy link
Member

phansch commented Sep 14, 2019

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!

@bors
Copy link
Collaborator

bors commented Sep 14, 2019

📌 Commit 80822b4 has been approved by phansch

@bors
Copy link
Collaborator

bors commented Sep 14, 2019

⌛ Testing commit 80822b4 with merge 6b6580c...

bors added a commit that referenced this pull request Sep 14, 2019
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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoa! 🤯

@bors
Copy link
Collaborator

bors commented Sep 14, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: phansch
Pushing 6b6580c to master...

@bors bors merged commit 80822b4 into rust-lang:master Sep 14, 2019
@jolson88 jolson88 deleted the fix-place-projection branch September 14, 2019 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

clippy-driver no longer builds after rust-lang/rust#63420
5 participants