Skip to content

missing hint for default generic type parameter #12

@phrohdoh

Description

@phrohdoh

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions