in macro by example matcher produces suggestion for nonsensica, syntactically invalid fix · Issue #157157 · rust-lang/rust · GitHub","description":"root tab size preference pre, code tab size var tab size preference locale featureFlags actions enable background steps activity diff file tree activity repo...","inLanguage":"en-US","isPartOf":{"@id":"https://kelaenderkoe.pages.dev/#website"},"datePublished":"2026-08-10T02:40:50.114Z","dateModified":"2026-08-10T02:40:50.114Z","breadcrumb":{"@id":"https://kelaenderkoe.pages.dev/docs/run-https-github.com/rust-lang/rust/issues/157157#breadcrumb"},"potentialAction":[{"@type":"ReadAction","target":["https://kelaenderkoe.pages.dev/docs/run-https-github.com/rust-lang/rust/issues/157157"]}]},{"@type":"Article","@id":"https://kelaenderkoe.pages.dev/docs/run-https-github.com/rust-lang/rust/issues/157157#article","headline":"Extraneous `
$ in macro by example matcher produces suggestion for nonsensica, syntactically invalid fix #157157
Code
Current output
Desired output
Rationale and extra context
Ideally I would like the diagnostic to point out the
$as extraneous and simply suggest its removal. Or at the very least, produce something that is syntactically correct Rust. even if it's not the code the user "meant" to write.Other cases
Rust Version
Anything else?
No response