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
From
Sorry if it is duplicate. In this code:
fn foo<T>(_: impl From<T>) -> T { todo!() } struct S; fn bar() { let x = foo(S); //^ x is `{unknown}`, but it should be `S` }
We fail to infer the type of x. It should be S since the only From<S> implementation is the generic impl From<T> for T from the standard library.
x
S
From<S>
impl From<T> for T
The text was updated successfully, but these errors were encountered:
#[rustc_reservation_impl]
bb66f6f
Successfully merging a pull request may close this issue.
Sorry if it is duplicate. In this code:
We fail to infer the type of
x
. It should beS
since the onlyFrom<S>
implementation is the genericimpl From<T> for T
from the standard library.The text was updated successfully, but these errors were encountered: