External Publication
Visit Post

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

Rust Internals [Unofficial] June 12, 2026
Source

It was a similar situation that led to my confusion. In this case it wasn't trybuild etc but rather autocfg which doesn't automatically set the edition.

I'd see the biggest "block" to those tools updating would be the lack of an immediately obvious basic cargo.toml parser in that part of the ecosystem that is fast and complete. As I'd assume the preffered approach would be to set the edition as per the crate's spec.

cargo_metadata has a runtime cost, which is annoying in tests & unsuitable in build scripts. cargo_toml uses serde, which adds extra build time. The workspace challenge makes simpler options less viable.

Discussion in the ATmosphere

Loading comments...