-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
A few iterator-related improvements #55067
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
4bf5948
to
a14a950
Compare
Errors fixed, comment addressed. |
@bors r+ |
📌 Commit a14a950 has been approved by |
…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`
☀️ Test successful - status-appveyor, status-travis |
@@ -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| { |
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 think this change injected #55810, because it delayed our type-checking of the patterns. (Note the comment right above this line.)
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.
Needs a stronger comment, heh.
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.
Yeah I'll be fixing that.
into_iter