tkaitchuck/constrandom

Release 0.1.10 breaks support for stable toolchain

Closed this issue · 6 comments

Compiling bevy which uses your crate, I run into an error with stable Rust (1.46.0) since the release of 0.1.10 on crates.io:

error[E0554]: `#![feature]` may not be used on the stable release channel
 --> /home/akien/.cargo/registry/src/github.com-1ecc6299db9ec823/const-random-macro-0.1.10/src/lib.rs:1:1
  |
1 | #![feature(proc_macro_quote)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Pinning to 0.1.8 fixes it.

Edit: I know that using the nightly toolchain would fix it, but I'm reporting this in case you didn't intend to make const-random-macro a nightly-only crate.

reyk commented

And ahash, hashbrown and many other crates that depend on it indirectly.

I have a similar problem when compiling clap under nightly-2020-05-07

error[E0658]: procedural macros cannot be expanded to expressions
  --> /home/shaxio01/.cargo/registry/src/github.com-1ecc6299db9ec823/const-random-macro-0.1.10/src/lib.rs:33:13
   |
33 |             quote!(($value as usize))
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #54727 <https://github.com/rust-lang/rust/issues/54727> for more information
   = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
vmx commented

In case you are blocked by this while developing, you can use my branch for now until this is resolved (in whichever way). Just patch the dependency in the root Cargo.toml of your project like this:

[patch.crates-io]
const-random-macro = { git = "https://github.com/vmx/constrandom", branch = "back-to-stable" }
Ten0 commented

Shouldn't 0.1.10 be yanked because of this?

@Ten0 It has been.