summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis
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_pattern_analysis
parentff2f7a7a834843ea74b1e7d6511eb4ad06f43981 (diff)
downloadrust-c25b44bee96e4489dab8f44409ba347bfeb328b9.tar.gz
rust-c25b44bee96e4489dab8f44409ba347bfeb328b9.zip
Fold `PatKind::NamedConstant` into `PatKind::Constant`
Diffstat (limited to 'compiler/rustc_pattern_analysis')
-rw-r--r--compiler/rustc_pattern_analysis/src/rustc.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_pattern_analysis/src/rustc.rs b/compiler/rustc_pattern_analysis/src/rustc.rs
index 6496d9fd73d..ec671150c40 100644
--- a/compiler/rustc_pattern_analysis/src/rustc.rs
+++ b/compiler/rustc_pattern_analysis/src/rustc.rs
@@ -536,7 +536,7 @@ impl<'p, 'tcx: 'p> RustcPatCtxt<'p, 'tcx> {
                     ),
                 }
             }
-            PatKind::Constant { value } | PatKind::NamedConstant { value, span: _ } => {
+            PatKind::Constant { value, opt_def: _ } => {
                 match ty.kind() {
                     ty::Bool => {
                         ctor = match value.try_eval_bool(cx.tcx, cx.param_env) {