Closed
Description
If a type parametrized struct is constructed with the parameter in the type name, the error produced is not relevant to the actual problem:
struct MyStruct<T> { my_field : T}
followed by:
let struct_instance = MyStruct<int> { my_field : 42}
Will produce the error:
error: expected one of `;`, `}` but found `:`
let struct_instance = MyStruct<int>{my_field : 42};
^
Which does not indicate that the error is due to the inclusion of '<int>
' after the struct's name.