{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreigdl4tzhsrk2ix524qahrlm2222ud646aqovtte5swqhmlevk5dpu",
    "uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mph2et4dzz52"
  },
  "path": "/t/code-compiles-on-playground-but-fails-when-passed-via-stdin-to-rustc/24393?page=2#post_30",
  "publishedAt": "2026-06-29T17:48:03.000Z",
  "site": "https://internals.rust-lang.org",
  "textContent": "kpreid:\n\n> 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>\n> When 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.\n\nThat makes perfect sense.\n\nkpreid:\n\n> That 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.\n\n**With a small twist I'd agree that that is a great idea ...**\n\nWhy 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. That way those who need or want very granular control have it with no extra effort and those who want \"full nightly\" also have that with no extra effort.\n\nIt's the idea of either requiring an opt-in if you don't want granular control, or, worse, if you don't want an arbitrary set of pre-defined features that irks me.\n\nNemo157:\n\n> By surfacing the feature as something the final developer actually enables\n\nand there's the rub ... the final developer cannot enable a feature if they are consuming via a transitive dependency.\n\nYes - you could require them to set a cfg flag or env variable manually ... and some choose that route. Personally, I prefer a crate that documents clearly if they auto-detect & use nightly features to one that makes me go through that hassle, and choose accordingly (just as others will choose the opposite)",
  "title": "Code compiles on playground but fails when passed via stdin to rustc"
}