External Publication
Visit Post

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

Rust Internals [Unofficial] June 21, 2026
Source

I agree that blanket deny(warnings) is a bad idea for feature probes, and even in general that makes compiler upgrades more likely to break your code.

epage:

Also, for fully general build probes, like autocfg, the edïtion should be set. The caller has to do this currently. We've approved telling build scripts the edition but it is unclear if that might get superseded by a compiler feature.

If that's going to be another of these environment variables, perhaps something like CARGO_PKG_EDITION, then that sounds great, and I would probably change autocfg to use that by default. I don't know how a compiler feature could supersede that though, because I would want the edition of the package with the build script, not of autocfg itself.

Discussion in the ATmosphere

Loading comments...