Closed TomAFrench closed 1 week ago
We currently do not allow applying a turbofish to a struct type, attempting to do so will result in a UnsupportedTurbofishUsage error
UnsupportedTurbofishUsage
struct Foo<T> { x: T } impl <T> Foo<T> { fn new(x: T) -> Self { Foo { x } } } fn main() { let _ = Foo::<i32>::new(1); }
We should implement support for the turbofish syntax in this situation.
I think this is a duplicate of #5584
I added support for parsing the turbofishes in the middle of paths but implementing this particular case is kind of tricky.
We currently do not allow applying a turbofish to a struct type, attempting to do so will result in a
UnsupportedTurbofishUsage
errorWe should implement support for the turbofish syntax in this situation.