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
It would be nice to be able to make a datatype like the following:
type tname<N> = Vec<[int; N]>;
Where N is not a type but an integer. So, for example:
let instance = tname::<5>::new();
would create an instance of Vec<int; 5]>
Vec<int; 5]>
The text was updated successfully, but these errors were encountered:
We do have http://doc.rust-lang.org/std/mem/fn.size_of.html to determine size at compile time, but it doesn't seem this is exactly what you're talking about.
To put a 5 in a type position like this, we would need rust-lang/rfcs#1038 , I think, and so this feels like a duplicate of that to me.
5
Sorry, something went wrong.
Yeah I think that it is a duplicate of that other issue.
No branches or pull requests
It would be nice to be able to make a datatype like the following:
Where N is not a type but an integer. So, for example:
would create an instance of
Vec<int; 5]>
The text was updated successfully, but these errors were encountered: