We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
fn f<T>(t:T) -> Box<T> { t.into() } // accepted fn f2<T: Into<u32>>(t:T) -> Box<T> { t.into() } // error fn f3<T: Into<u32>>(t:T) -> Box<T> { <T as Into<Box<T>>>::into(t) } // accepted
This seems counterintuitive: adding the Into<u32> suppresses the other implementations of Into<...>.
Into<u32>
Into<...>
The text was updated successfully, but these errors were encountered:
Seems related or perhaps even identical to #24066
Sorry, something went wrong.
All three forms now compile, so I'm going to close.
Not again, I tested in the wrong directory. Re-opening....
I'm going to close this in favor of #24066. That contains the same problem (masking other impls with a where clause).
No branches or pull requests
This seems counterintuitive: adding the
Into<u32>
suppresses the other implementations ofInto<...>
.The text was updated successfully, but these errors were encountered: