-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Allow coercions from statically sized to dynamically sized arrays #13716
Comments
This only allows them at the type checking stage. We still require implementation in trans. Also needs tests. Part of rust-lang#13716.
I wanted to clarify something about the plan with DST. Currently, we allow a third variant of the above: fn use_slice(s: &[u8]) {}
fn main() {
let s: [u8, ..3] = [0,1,2];
use_slice(s);
} In other words, we coerce from My question is: as part of the DST coercion work, are you planning to remove this coercion? Alternatively, I wonder if it might make sense to replace this coercion with |
I believe we should not coerce from |
This work has landed now. re the |
The following should be valid:
The text was updated successfully, but these errors were encountered: