Code compiles on playground but fails when passed via stdin to rustc
Rust Internals [Unofficial]
June 23, 2026
cuviper:
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 changeautocfgto 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 ofautocfgitself.
Around the time we approved an environment variable, there started talk among T-lang to add an edition cfg which would then be exposed to build scripts as CARGO_CFG_EDITION. That went through several proposals, delaying it. The latest has been untouched for enough time that it might not be worth waiting on anymore and to instead use CARGO_PKG_EDITION.
Discussion in the ATmosphere