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
mod MyMod { struct GenericStruct<T> { a: T, b: u32, } pub fn main() -> i32 { let value: GenericStruct<i32> = GenericStruct::<i32> { a: 2, b: 4, }; return value.a; } }
Currently for generic structs and functions, the types need to be specified while they could be reasonably infered by the arguments used.
So this would turn into
mod MyMod { struct GenericStruct<T> { a: T, b: u32, } pub fn main() -> i32 { // Maybe we can even infer let types completely too. let value: GenericStruct<i32> = GenericStruct { a: 2, b: 4, }; return value.a; } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Currently for generic structs and functions, the types need to be specified while they could be reasonably infered by the arguments used.
So this would turn into
The text was updated successfully, but these errors were encountered: