You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The latest rustc compiler tries to detect the use of unknown #[cfg()] conditions. It's triggering in lalrpop-generated code. The easiest way to reproduce the problem is to simply run cargo check -p nobol in lalrpop's own git repo. Or, it can be reproduced by trying to compile a file like this:
warning: unexpected `cfg` condition name: `rustfmt`
--> /usr/home/somers/src/rust/bfffs/target/debug/build/bfffs-555042f4e29eb538/out/x.rs:12:12
|
12 | #[cfg_attr(rustfmt, rustfmt_skip)]
| ^^^^^^^
|
= help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(rustfmt)");` to the top of the `build.rs`
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `rustfmt`
--> /usr/home/somers/src/rust/bfffs/target/debug/build/bfffs-555042f4e29eb538/out/x.rs:303:12
|
303 | #[cfg_attr(rustfmt, rustfmt_skip)]
| ^^^^^^^
|
= help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(rustfmt)");` to the top of the `build.rs`
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
This just landed on nightly right? I'm interested in fixing this(I think it exposed some other cfg issues that went undetected with cfg(feature = "test"). Ironically though, the example you included has just been fixed on the latest nightly(because of issues with rustfmt).
The latest rustc compiler tries to detect the use of unknown
#[cfg()]
conditions. It's triggering in lalrpop-generated code. The easiest way to reproduce the problem is to simply runcargo check -p nobol
in lalrpop's own git repo. Or, it can be reproduced by trying to compile a file like this:Which results in the warning
This is the rust version I'm currently using:
The text was updated successfully, but these errors were encountered: