about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src/lints.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-01-05 20:39:54 +0100
committerGitHub <noreply@github.com>2024-01-05 20:39:54 +0100
commita060ed2c06a5f2689dde93aec23f602d7327a77e (patch)
tree71ea30657fd40e23a4ff6687e9c83956334876ff /compiler/rustc_pattern_analysis/src/lints.rs
parent60a2b437080ad3ec4d5d334c314a20a2c0f9cbc1 (diff)
parent718a4337acfd2f28682bfaf9179a9e18bf4040b9 (diff)
downloadrust-a060ed2c06a5f2689dde93aec23f602d7327a77e.tar.gz
rust-a060ed2c06a5f2689dde93aec23f602d7327a77e.zip
Rollup merge of #119622 - Nadrieril:never_patterns_macros, r=compiler-errors
never patterns: Document behavior of never patterns with macros-by-example

`never_patterns` makes `!` parse as a pattern so I was worried about breaking macros-by-example matching. Turns out we're fine because the cases that now match `$p:pat` used to error in the past. The only tricky case is `!` by itself, which backwards-compatibly doesn't match `$p:pat`. I have no idea why tho, I didn't think of that when I was implementing parsing :sweat_smile:.

This adds tests so we don't regress the current behavior.

r? `@compiler-errors`
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/lints.rs')
0 files changed, 0 insertions, 0 deletions