{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreie44snp72kdalkbf27soxlhphuie3s6ekchypyxg6gs4jvpzarwo4",
"uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mo7cbzi4lto2"
},
"path": "/t/why-cant-pat-param-be-followed-by-a-colon-in-macro-rules/24394#post_4",
"publishedAt": "2026-06-13T22:20:45.000Z",
"site": "https://internals.rust-lang.org",
"textContent": "I would also like it if we _didn't_ lift this restriction, because I'd like to reuse top-level pattern type ascription as the syntax to obtain access to anonymous enum variants:\n\n\n fn foo() -> A | B { todo!() }\n\n match foo() {\n x: A => {}\n x: B => {}\n }\n",
"title": "Why can't pat_param be followed by a colon in macro_rules?"
}