{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreielxdfmd5i652vr6nq7c3pbchabuoj5sx2lcd5lsqtjqpmnppfacy",
"uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mph2en4slig2"
},
"path": "/t/code-compiles-on-playground-but-fails-when-passed-via-stdin-to-rustc/24393?page=2#post_31",
"publishedAt": "2026-06-29T17:48:45.000Z",
"site": "https://internals.rust-lang.org",
"tags": [
"Pre-RFC: Mutually-excusive, global features",
"doc.rust-lang.org",
"allow-features - Unstable Features - The Cargo Book"
],
"textContent": "kpreid:\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. 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.\n\nI have wondered about replacing `nightly` cargo features with Pre-RFC: Mutually-excusive, global features . More recently, I found out about `-Zallow-features` and wonder if there is something there we could build up to better support these use cases, including forwarding that to build scripts and proc-macros for the code they generate.\n\ndoc.rust-lang.org\n\n### allow-features - Unstable Features - The Cargo Book\n\nExperimental Cargo features are only available on the nightly channel. You are encouraged to experiment with these features to see if they meet your needs, and if there are any issues or problems. Check the linked tracking issues listed below for...",
"title": "Code compiles on playground but fails when passed via stdin to rustc"
}