{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreigay73wffy5edu3og2v5vqf6i5gyv6ev3reekjctvti6zolrqxeni",
    "uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mo3rh26ln2i2"
  },
  "path": "/t/code-compiles-on-playground-but-fails-when-passed-via-stdin-to-rustc/24393#post_10",
  "publishedAt": "2026-06-12T11:01:16.000Z",
  "site": "https://internals.rust-lang.org",
  "textContent": "It was a similar situation that led to my confusion. In this case it wasn't `trybuild` etc but rather `autocfg` which doesn't automatically set the edition.\n\nI'd see the biggest \"block\" to those tools updating would be the lack of an immediately obvious basic `cargo.toml` parser in that part of the ecosystem that is fast and complete. As I'd assume the preffered approach would be to set the edition as per the crate's spec.\n\n`cargo_metadata` has a runtime cost, which is annoying in tests & unsuitable in build scripts. `cargo_toml` uses `serde`, which adds extra build time. The workspace challenge makes simpler options less viable.",
  "title": "Code compiles on playground but fails when passed via stdin to rustc"
}