Fold PatKind::NamedConstant into PatKind::Constant

This commit is contained in:
Esteban Küber
2024-11-06 21:10:31 +00:00
parent ff2f7a7a83
commit c25b44bee9
12 changed files with 21 additions and 33 deletions

View File

@@ -370,9 +370,7 @@ impl<'a, 'tcx> IsThirPolymorphic<'a, 'tcx> {
}
match pat.kind {
thir::PatKind::Constant { value } | thir::PatKind::NamedConstant { value, span: _ } => {
value.has_non_region_param()
}
thir::PatKind::Constant { value, opt_def: _ } => value.has_non_region_param(),
thir::PatKind::Range(box thir::PatRange { lo, hi, .. }) => {
lo.has_non_region_param() || hi.has_non_region_param()
}