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
Make length type generic #256
base: master
Are you sure you want to change the base?
Make length type generic #256
Conversation
812ca47
to
4fb1f1b
Compare
4fb1f1b
to
eefee31
Compare
I'm really interested in this, but it seems like there are conflicts that need to be resolved @JakkuSakura? |
Hi, while it's easy to resolve the conflicts, the potentially breaking semantics should be carefully evaluated by the author, before merging |
Okay, I've opened a PR on your repo with some fun type system hacks that fix the inference for |
…pe-over-new-layout # Conflicts: # src/array_string.rs # src/arrayvec.rs
It's almost perfect let string = ArrayString::<11>::from_byte_string(b"hello world").unwrap(); the only tests that failed was ArrayString without <11>. it's related to the way rust handles inferred type with default type generics. |
It's really a lot of work being done
This PR resolves #247, supersedes #248
However, some things are broken:
type inference won't work for
ArrayVec::from([0; N])
like beforesome functions like
len()
are no longerconst
, unless nightly is enabledThis PR is expected to be merged after #255