-
Notifications
You must be signed in to change notification settings - Fork 244
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 using MaybeUninit
#981
Comments
I can also add that using |
Hmmm, from the tests it looks like this might already be supported? |
@NiklasNummelin @LegNeato Sorry I forgot about this, but it looks like the issue here is specifically arrays? What were you using EDIT: oh, I see, |
This PR has a fix (in its first commit) for However, I haven't added tests, or even tried it out beyond the |
Haven't looked into reproducing this yet but it's very likely that It might be fine for fixed-length arrays, so your original usecase is probably fine, but |
When using
MaybeUninit
to initialize variables one gets this issue:error: Cannot cast between pointer types. From: [u8; 256]. To: *struct core::mem::ManuallyDrop<[Vec4; 16]> { value: [f32x4; 16] }.
Would be nice to allow, if possible, as it's often unnecessary to initialize variables in shaders and adds additional overhead.
The text was updated successfully, but these errors were encountered: