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

A few iterator-related improvements #55067

Merged
merged 3 commits into from
Oct 16, 2018

Conversation

ljedrz
Copy link
Contributor

@ljedrz ljedrz commented Oct 14, 2018

  • typeck: don't collect into a vector when unnecessary
  • create only one vector when winnowing candidates
  • change a cloning map to into_iter

@rust-highfive
Copy link
Collaborator

r? @petrochenkov

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 14, 2018
@rust-highfive

This comment has been minimized.

@ljedrz ljedrz force-pushed the generic_iterator_related_improvements branch from 4bf5948 to a14a950 Compare October 14, 2018 15:38
@ljedrz
Copy link
Contributor Author

ljedrz commented Oct 14, 2018

Errors fixed, comment addressed.

@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Oct 15, 2018

📌 Commit a14a950 has been approved by petrochenkov

@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 Oct 15, 2018
@bors
Copy link
Contributor

bors commented Oct 16, 2018

⌛ Testing commit a14a950 with merge 5ea8eb5...

bors added a commit that referenced this pull request Oct 16, 2018
…r=petrochenkov

A few iterator-related improvements

- typeck: don't collect into a vector when unnecessary
- create only one vector when winnowing candidates
- change a cloning map to `into_iter`
@bors
Copy link
Contributor

bors commented Oct 16, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: petrochenkov
Pushing 5ea8eb5 to master...

@bors bors merged commit a14a950 into rust-lang:master Oct 16, 2018
@ljedrz ljedrz deleted the generic_iterator_related_improvements branch October 16, 2018 09:59
@@ -626,7 +626,7 @@ https://doc.rust-lang.org/reference/types.html#trait-objects");

// Typecheck the patterns first, so that we get types for all the
// bindings.
let all_arm_pats_diverge: Vec<_> = arms.iter().map(|arm| {
let all_arm_pats_diverge = arms.iter().map(|arm| {
Copy link
Member

Choose a reason for hiding this comment

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

I think this change injected #55810, because it delayed our type-checking of the patterns. (Note the comment right above this line.)

Copy link
Member

Choose a reason for hiding this comment

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

Needs a stronger comment, heh.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah I'll be fixing that.

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.

7 participants