External Publication
Visit Post

Code compiles on playground but fails when passed via stdin to rustc

Rust Internals [Unofficial] June 29, 2026
Source

kpreid:

That said, I would also enjoy having a sort of global feature flag (perhaps just a conventional environment variable, or cfg to stick in RUSTFLAGS?) to tell every dependency "yes, do use all the unstable features you would like to", for the testing of nightly features. But I don't want that to be implied by any usage of nightly at all, which is what happens when libraries use build probes for unstable features.

I have wondered about replacing nightly cargo features with Pre-RFC: Mutually-excusive, global features . More recently, I found out about -Zallow-features and wonder if there is something there we could build up to better support these use cases, including forwarding that to build scripts and proc-macros for the code they generate.

doc.rust-lang.org

allow-features - Unstable Features - The Cargo Book

Experimental Cargo features are only available on the nightly channel. You are encouraged to experiment with these features to see if they meet your needs, and if there are any issues or problems. Check the linked tracking issues listed below for...

Discussion in the ATmosphere

Loading comments...