1
Fork 0

Rollup merge of #119967 - ShE3py:patkind-err, r=WaffleLapkin

Add `PatKind::Err` to AST/HIR

#116715 added `thir::PatKind::Error`; this PR adds `hir::PatKind::Err` and `ast::PatKind::Err` (see https://github.com/rust-lang/rust/pull/118625#discussion_r1446587901.)

---

``@rustbot`` label +A-patterns
r? WaffleLapkin
This commit is contained in:
Matthias Krüger 2024-01-18 10:34:18 +01:00 committed by GitHub
commit 1f93d2b411
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 66 additions and 24 deletions

View file

@ -303,7 +303,8 @@ impl<'v> hir_visit::Visitor<'v> for StatCollector<'v> {
Ref,
Lit,
Range,
Slice
Slice,
Err
]
);
hir_visit::walk_pat(self, p)
@ -576,7 +577,8 @@ impl<'v> ast_visit::Visitor<'v> for StatCollector<'v> {
Rest,
Never,
Paren,
MacCall
MacCall,
Err
]
);
ast_visit::walk_pat(self, p)