Compile error in bytemuck_derive
kvark opened this issue · 3 comments
kvark commented
graphics35334:wgpu-rs dmalyshau$ cargo test
Updating crates.io index
Updating git repository `https://github.com/gfx-rs/wgpu`
Downloaded proc-macro2 v1.0.21
Downloaded bytemuck v1.4.1
Downloaded syn v1.0.40
Downloaded bytemuck_derive v1.0.0
Compiling proc-macro2 v1.0.21
Compiling syn v1.0.40
Compiling wgpu-core v0.6.0 (/Users/dmalyshau/Code/wgpu/wgpu-core)
Compiling wgpu-types v0.6.0 (/Users/dmalyshau/Code/wgpu/wgpu-types)
Compiling quote v1.0.3
Compiling thiserror-impl v1.0.20
Compiling bytemuck_derive v1.0.0
error[E0433]: failed to resolve: use of undeclared type or module `proc_macro`
--> /Users/dmalyshau/.cargo/registry/src/github.com-1ecc6299db9ec823/bytemuck_derive-1.0.0/src/lib.rs:36:26
|
36 | pub fn derive_pod(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
| ^^^^^^^^^^ use of undeclared type or module `proc_macro`
Looks like it can't find the proc_macro
thing on my machine. I wonder why?
Lokathor commented
Looking at the code, I'm noticing that they didn't write extern crate proc_macro
, which used to be needed for proc macros but I vaguely recall that requirement was removed at some point... are you on an old compiler?
kvark commented
Yes, that was on 1.41.1. I tried on latest, and it works fine. Feel free to close, but beware of the MSRV.
Lokathor commented
I'll try to push out a patch soon. No reason to not support the farther back compilers when it's just a 1 line change needed.