Hi! I’m encountering the following sort of cargo build errors using the nightly toolchain on Linux (cargo 1.29.0-nightly (b42488270 2018-08-04):
error[E0658]: use of unstable library feature 'proc_macro_span' (see issue #38356) --> /arc/u/marf/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.4.6/src/unstable.rs:284:13 | 284 | Nightly(proc_macro::SourceFile, FileName), | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(proc_macro_span)] to the crate attributes to enable
I’ve attempted to use the
RUSTFLAGS environment variable to enable these unstable features (as I saw documented or suggested somewhere) but without success:
$ RUSTFLAGS='--cfg proc_macro_span' cargo +nightly build
Is this the right way to enable unstable features using the command line? I’ve also tried various formulations to specify these unstable feature attributes in .cargo/config, again without success.
As this is someone else’s project I’ve just cloned to install and try out, I’d rather not modify the source code, at least not yet. Am I on the right track here? What’s the best way to do this?