Skip to content

missing hint for default generic type parameter #12

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

Open
phrohdoh opened this issue Dec 15, 2020 · 0 comments
Open

missing hint for default generic type parameter #12

phrohdoh opened this issue Dec 15, 2020 · 0 comments

Comments

@phrohdoh
Copy link

What I expected

Please see https://users.rust-lang.org/t/a-question-about-syntax/52790/2 & https://doc.rust-lang.org/stable/book/ch19-03-advanced-traits.html#default-generic-type-parameters-and-operator-overloading.

Source code

 0 | struct Foo<T = String>(T);
   |              ↑
 1 | 
 2 | fn main() {
 3 |   let x: Foo = Foo(String::from("thunk"));
 4 |   let y: Foo<i32> = Foo(17);
 5 | }

Location: line 0, column 13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants