{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreihkgkbq7uzngpiapajle6ghhcaond6hk3j2rhy5p2fjdkq4twj4m4",
    "uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mota5mudtvn2"
  },
  "path": "/t/code-compiles-on-playground-but-fails-when-passed-via-stdin-to-rustc/24393#post_20",
  "publishedAt": "2026-06-21T17:56:38.000Z",
  "site": "https://internals.rust-lang.org",
  "tags": [
    "environment variables"
  ],
  "textContent": "I agree that blanket `deny(warnings)` is a bad idea for feature probes, and even in general that makes compiler upgrades more likely to break your code.\n\nepage:\n\n> Also, for fully general build probes, like `autocfg`, the edïtion should be set. The caller has to do this currently. We've approved telling build scripts the edition but it is unclear if that might get superseded by a compiler feature.\n\nIf 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.",
  "title": "Code compiles on playground but fails when passed via stdin to rustc"
}