[features] flags not applying to --examples?


I’m trying to build some examples from a repository (limn) using ‘cargo build --examples’.
The Cargo.toml file in the top level folder has the lines:
nightly = []
But the ‘nightly’ flag doesn’t get passed to the rustc when the examples are compiled.
Should the feature flags get passed down to the examples or am I missing something?


To enable the feature, run: cargo build --examples --features nightly

Or if you want it enabled be default, add default = ["nightly"] to the [features] section of Cargo.toml.


Ah, thanks so much Matt. It’s the first time I’ve used these forums - thank you for being so prompt and so helpful, I really appreciate it.