{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreib53dft4kzugnbtilfopz4kbyvoq4wkb4fo6gi66dvlvgzeavlphm",
    "uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mozrzlm75zj2"
  },
  "path": "/t/code-compiles-on-playground-but-fails-when-passed-via-stdin-to-rustc/24393?page=2#post_22",
  "publishedAt": "2026-06-23T14:47:41.000Z",
  "site": "https://internals.rust-lang.org",
  "tags": [
    "environment variables"
  ],
  "textContent": "cuviper:\n\n> 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 change `autocfg` to 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 of `autocfg` itself.\n\nAround 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`.",
  "title": "Code compiles on playground but fails when passed via stdin to rustc"
}