{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreiavy6qhvynophfczudr227pvud7miyxakaxkmqy5uhmy3snrmguzy",
    "uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mldcmepyhc72"
  },
  "path": "/t/rustc-lexer-diagnostics-feature-request-color-highlight-acceptable-characters/24227#post_1",
  "publishedAt": "2026-05-08T05:32:11.000Z",
  "site": "https://internals.rust-lang.org",
  "textContent": "Hi. This applies probably to `macro_rules`/macro v.2 only (correct me otherwise). When the lexer/tokenizer reports errors like\n\n\n    error: `$r#trait:ty` is followed by `(`, which is not allowed for `ty` fragments\n       --> src/lib.rs:174:17\n        |\n    174 |                 ( $(\n        |                 ^ not allowed after `ty` fragments\n        |\n        = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where`\n\n\ncould it be possible to highlight each allowed characters/tokens (in terminals that use colors)? It already makes `error` red and `warning` yellow (though that is surely higher up the function call chain).",
  "title": "Rustc lexer diagnostics feature request: Color highlight acceptable characters"
}