{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreifi4unrakxmiypk7n4jhti2i4mogcrzfahirlzzad7x6hdwjpvuca",
    "uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mggdjv7inol2"
  },
  "path": "/t/feature-request-proc-macro-with-content-as-string/24061#post_2",
  "publishedAt": "2026-03-06T22:12:28.000Z",
  "site": "https://internals.rust-lang.org",
  "textContent": "I don't think such a change would be accepted. That would make it impossible for rustfmt to do any formatting inside of macro bodies. Also how would we delimit the body if the body is allowed to contain arbitrary data, including unbalanced `{` and `}`? The Rust syntax becoming whitespace sensitive would also be a major change and surprising for many people. You are probably better off just accepting a string literal inside your macro like so:\n\n\n    let content = html! {r#\"\n\n    <h1>The string to process</h1>\n\n    \"#};\n",
  "title": "Feature request: proc_macro with content as string"
}