-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Correct regression in type-inference #27258
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
Conversation
src/librustc/middle/traits/select.rs
Outdated
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.
nit: I think this iterator salad would actually be clearer as a for-loop
r+ modulo nit |
src/librustc/middle/traits/select.rs
Outdated
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.
Couldn't this be done without collecting?
the object trait matches the required trait during trait selection. The existing code was checking that the object trait WOULD match (in a probe), but never executing the match outside of a probe. This corrects various regressions observed in the wild, including issue rust-lang#26952. Fixes rust-lang#26952.
93e7295
to
4726bb4
Compare
@eddyb updated |
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.
Time to remove a thousand clone calls :P.
@huonw @Manishearth How about a lint against calling .clone()
on a Copy
type?
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.
Sounds good to me.
@bors r+ |
📌 Commit 4726bb4 has been approved by |
Correct regression in type-inference caused by failing to reconfirm that the object trait matches the required trait during trait selection. The existing code was checking that the object trait WOULD match (in a probe), but never executing the match outside of a probe. This corrects various regressions observed in the wild, including issue rust-lang#26952. Fixes rust-lang#26952. r? @eddyb cc @frankmcsherry
Correct regression in type-inference caused by failing to reconfirm that the object trait matches the required trait during trait selection. The existing code was checking that the object trait WOULD match (in a probe), but never executing the match outside of a probe. This corrects various regressions observed in the wild, including issue #26952. Fixes #26952. r? @eddyb cc @frankmcsherry
Correct regression in type-inference caused by failing to reconfirm that
the object trait matches the required trait during trait selection. The
existing code was checking that the object trait WOULD match (in a
probe), but never executing the match outside of a probe.
This corrects various regressions observed in the wild, including
issue #26952. Fixes #26952.
r? @eddyb
cc @frankmcsherry