Closed shepmaster closed 1 year ago
Uh... what? "not a trait"? is this some new nightly bug?
Same issue here, after I tried rustup update
today:
info: syncing channel updates for 'nightly-x86_64-pc-windows-msvc'
info: latest update on 2023-06-20, rust version 1.72.0-nightly (fe7454bf4 2023-06-19)
info: downloading component 'rust-src'
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: removing previous version of component 'rust-src'
info: removing previous version of component 'cargo'
info: removing previous version of component 'clippy'
info: removing previous version of component 'rust-docs'
info: removing previous version of component 'rust-std'
info: removing previous version of component 'rustc'
info: removing previous version of component 'rustfmt'
error[E0404]: expected trait, found derive macro `NoUninit`
--> C:\Users\Vito\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bytemuck-1.13.1\src\allocation.rs:25:20
|
25 | pub fn cast_box<A: NoUninit, B: AnyBitPattern>(input: Box<A>) -> Box<B> {
| ^^^^^^^^ not a trait
|
help: consider importing this trait instead
|
12 + use crate::NoUninit;
yeah but the top of the file says use super::*;
so i can only surmise that this is a compiler bug.
https://github.com/Lokathor/bytemuck/blob/main/src/allocation.rs#L12
@Lokathor @shepmaster Yes, it seems to be a rustc
bug, so I retreat to nightly-2023-06-17
and it works fine for me.
I (forgot to check this repo first and) filed a rustc issue: https://github.com/rust-lang/rust/issues/112860
[Update: … and missed it was already reported and fixed]
For googlers: This issue appears to be fixed as of nightly-2023-06-20
. Just run rustup update
.❤️
Thanks ya'll! :)
Seems everyone agrees it's fixed, closing this one up.
Notably, this affects the playground build.