External Publication
Visit Post

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

Rust Internals [Unofficial] June 29, 2026
Source

epage:

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.

MusicalNinjaDad:

Why not the other way around? Instead of requiring an opt-in to a full nightly experience on nightly, provide an opt-in-to-only which then disables everything else.

Sounds like that actually already exists. (Thanks - another thing I learned today!)

So, what's the concern about a build probe which correctly reacts to RUSTFLAGS="-Zallow-features=" by not enabling any nightly features?

If you want to limit what is enabled on nightly for reasons like those above, set the env variable, ...

(I just checked and all my probes react correctly to it - so it's not rocket science, just so under-documented that getting probes right is much harder than it needs to be)

Discussion in the ATmosphere

Loading comments...