diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2024-11-06 21:10:31 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2024-11-17 23:39:59 +0000 |
| commit | c25b44bee96e4489dab8f44409ba347bfeb328b9 (patch) | |
| tree | dbba1316368f803b9edf0887e0842631bcab66d1 /compiler/rustc_ty_utils/src | |
| parent | ff2f7a7a834843ea74b1e7d6511eb4ad06f43981 (diff) | |
| download | rust-c25b44bee96e4489dab8f44409ba347bfeb328b9.tar.gz rust-c25b44bee96e4489dab8f44409ba347bfeb328b9.zip | |
Fold `PatKind::NamedConstant` into `PatKind::Constant`
Diffstat (limited to 'compiler/rustc_ty_utils/src')
| -rw-r--r-- | compiler/rustc_ty_utils/src/consts.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_ty_utils/src/consts.rs b/compiler/rustc_ty_utils/src/consts.rs index 3a0eb8143cd..12f169d718c 100644 --- a/compiler/rustc_ty_utils/src/consts.rs +++ b/compiler/rustc_ty_utils/src/consts.rs @@ -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() } |
