Skip to content

Use while let slice_pattern instead of carrying an index around #64518

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

Merged

Conversation

spastorino
Copy link
Member

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 16, 2019
@oli-obk
Copy link
Contributor

oli-obk commented Sep 16, 2019

@bors r+

@bors
Copy link
Collaborator

bors commented Sep 16, 2019

📌 Commit d1f763f has been approved by oli-obk

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 16, 2019
Centril added a commit to Centril/rust that referenced this pull request Sep 16, 2019
…r-proj-slice, r=oli-obk

Use while let slice_pattern instead of carrying an index around

r? @oli-obk
Centril added a commit to Centril/rust that referenced this pull request Sep 16, 2019
…r-proj-slice, r=oli-obk

Use while let slice_pattern instead of carrying an index around

r? @oli-obk
@@ -614,8 +614,9 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
projection,
} = first_borrowed_place;

for (i, elem) in projection.iter().enumerate().rev() {
let proj_base = &projection[..i];
let mut cursor = &**projection;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we refactor this idiom into a method on projection to reduce the repetition?

Centril added a commit to Centril/rust that referenced this pull request Sep 16, 2019
…r-proj-slice, r=oli-obk

Use while let slice_pattern instead of carrying an index around

r? @oli-obk
bors added a commit that referenced this pull request Sep 16, 2019
Rollup of 4 pull requests

Successful merges:

 - #64357 (`AdtDef` is an algebraic data type, not abstract data type)
 - #64485 (update Miri)
 - #64509 (Make some adjustments to the documentation for `std::convert::identity`)
 - #64518 (Use while let slice_pattern instead of carrying an index around)

Failed merges:

r? @ghost
@bors bors merged commit d1f763f into rust-lang:master Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants