about summary refs log tree commit diff
path: root/compiler/rustc_ty_utils/src/consts.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_ty_utils/src/consts.rs')
-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()
             }