-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Check FromIterator trait impl in prelude collision check. #86904
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
r? @jackh726 (rust-highfive has picked a reviewer for you, use r? to override) |
Oh, looks like this actually explodes if the type is generic. :( |
struct X<T>(T);
trait Hey {
fn from_iter(_: i32) -> Self;
}
impl Hey for X<i32> {
fn from_iter(x: i32) -> Self {
X(x)
}
}
fn main() {
X::from_iter(1);
} It works for
I'm guessing I need to fill something in for the T of X. |
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #86920) made this pull request unmergeable. Please resolve the merge conflicts. |
c3903c9
to
10d6b34
Compare
Updated! Let's see if it works now.. :) Also found a bug in the suggestion for |
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.
Looks good, one nit
@bors r+ |
📌 Commit 2083207 has been approved by |
☀️ Test successful - checks-actions |
Fixes #86902.