{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreih2i3eimihl6ebzsthv4ailrtpmhaatoeryasneamuv2bhr55mppy",
"uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mph2f7hunby2"
},
"path": "/t/code-compiles-on-playground-but-fails-when-passed-via-stdin-to-rustc/24393?page=2#post_28",
"publishedAt": "2026-06-29T15:39:25.000Z",
"site": "https://internals.rust-lang.org",
"textContent": "As the person choosing the toolchain to build with, I may be using nightly for any number of reasons; in particular, I may be using it to get access to flags useful for debugging that aren't stable, or to use a newer compiler version that might have fixed a bug.\n\nWhen I switch to nightly for one of those reasons, I _don't_ want my project's dependencies to _also_ implicitly change to making use of unstable features. I don't want them to be compiling different code. I don't want them to be exercising parts of the compiler that are marked unstable. I want everything about those dependencies to be exactly the same except what I chose to change (the compiler version) so that the results of my experiment are as controlled as possible.\n\nThat 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.",
"title": "Code compiles on playground but fails when passed via stdin to rustc"
}