Add or-patterns to pattern types

This commit is contained in:
Oli Scherer
2025-02-27 09:46:46 +00:00
parent cb6d3715a5
commit b023856f29
34 changed files with 504 additions and 14 deletions

View File

@@ -1813,6 +1813,9 @@ pub enum TyPatKind<'hir> {
/// A range pattern (e.g., `1..=2` or `1..2`).
Range(&'hir ConstArg<'hir>, &'hir ConstArg<'hir>),
/// A list of patterns where only one needs to be satisfied
Or(&'hir [TyPat<'hir>]),
/// A placeholder for a pattern that wasn't well formed in some way.
Err(ErrorGuaranteed),
}