about summary refs log tree commit diff
path: root/compiler/rustc_ty_utils/src
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2024-11-06 21:10:31 +0000
committerEsteban Küber <esteban@kuber.com.ar>2024-11-17 23:39:59 +0000
commitc25b44bee96e4489dab8f44409ba347bfeb328b9 (patch)
treedbba1316368f803b9edf0887e0842631bcab66d1 /compiler/rustc_ty_utils/src
parentff2f7a7a834843ea74b1e7d6511eb4ad06f43981 (diff)
downloadrust-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.rs4
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()
             }