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 foo<T, U>(u: U) -> T where T: From<U> { From::from(u) } fn main() { println!("{}", foo(0u16): u16); // works println!("{}", foo::<u16>(0u16)); // doesn't work println!("{}", foo::<u16, u16>(0u16)); // works }
I want the middle one to work. There's no real reason for it not to, and it does work in C++.
The text was updated successfully, but these errors were encountered:
Being a language change, this belongs in https://github.com/rust-lang/rfcs.
Otherwise, you can also do this: foo::<u16, _>(0u16)
foo::<u16, _>(0u16)
Sorry, something went wrong.
Partial type application?
opened at rust-lang/rfcs#1989
No branches or pull requests
I want the middle one to work. There's no real reason for it not to, and it does work in C++.
The text was updated successfully, but these errors were encountered: