|
// If there are no `RUSTFLAGS` or `CARGO_ENCODED_RUSTFLAGS` or they don't |
|
// contain an `allow-features` flag, assume compiler allows all features. |
|
Some(true) |
By default Cargo does not pass any rustflags. These env vars are for users' extra flags, and don't include the usual flags used when compiling, so de-facto there's no filtering, and version_check naively allows any feature flag on any (edit: nightly) Rust version.
Rust renames, removes, or stabilizes nightly flags without warning. Crates checking for flags using version_check will sooner or later end up breaking the build by using flags that may no longer exist.
This check needs to be more robust. At least try compiling a file with #![feature(…)] in it to check if it still exists.
version_check/src/lib.rs
Lines 349 to 351 in d77ef9f
By default Cargo does not pass any rustflags. These env vars are for users' extra flags, and don't include the usual flags used when compiling, so de-facto there's no filtering, and
version_checknaively allows any feature flag on any (edit: nightly) Rust version.Rust renames, removes, or stabilizes nightly flags without warning. Crates checking for flags using
version_checkwill sooner or later end up breaking the build by using flags that may no longer exist.This check needs to be more robust. At least try compiling a file with
#![feature(…)]in it to check if it still exists.