-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
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
heapless on const generics: status #102
Comments
Hi, this is a very interesting and strategical step forward for the heapless crate. Here are my thought on the In general what is needed is a static assertion for the const generic.
|
@burrbull thanks for trying this out. I think the compiler team will appreciate all the bug reports. From my side, I would prefer not to make heapless depend / use const generics in any form (even behind a Cargo feature) until the feature has been (partially) stabilized. Nightly features are a maintenance burden that I would prefer to avoid. |
It's a good day. |
This still seems blocked even with min_const_generics on "using type defaults and const parameters in the same parameter list is currently not permitted" |
See #168 for up to date version of this. |
I tried to port
heapless
types from GenericArray tousize
const generics.Here is branch.
Today I managed to compile it in release mode.
For testing you can use:
cargo test --release
.Issues:
Queue
doesn't work. Fails on type inference. I think the problem is in the interaction of default types and const generics.pub struct Consumer<'a, T, U = usize, C = MultiCore, const N: usize>
PowerOfTwo
restriction forindexmap
.Everything else is pretty good.
rustc 1.37.0-nightly (8aa42ed7c 2019-06-24)
The text was updated successfully, but these errors were encountered: