diff options
Diffstat (limited to 'compiler/rustc_mir_build/src')
| -rw-r--r-- | compiler/rustc_mir_build/src/build/expr/as_constant.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_mir_build/src/thir/pattern/deconstruct_pat.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_mir_build/src/thir/pattern/mod.rs | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_mir_build/src/build/expr/as_constant.rs b/compiler/rustc_mir_build/src/build/expr/as_constant.rs index 035e94eecee..a87134d1f52 100644 --- a/compiler/rustc_mir_build/src/build/expr/as_constant.rs +++ b/compiler/rustc_mir_build/src/build/expr/as_constant.rs @@ -15,7 +15,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { let create_uneval_from_def_id = |tcx: TyCtxt<'tcx>, def_id: DefId, ty: Ty<'tcx>, substs: SubstsRef<'tcx>| { let uneval = ty::Unevaluated::new(ty::WithOptConstParam::unknown(def_id), substs); - tcx.mk_const(ty::ConstS { val: ty::ConstKind::Unevaluated(uneval), ty }) + tcx.mk_const(ty::ConstS { kind: ty::ConstKind::Unevaluated(uneval), ty }) }; let this = self; @@ -64,7 +64,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { } ExprKind::ConstParam { param, def_id: _ } => { let const_param = - tcx.mk_const(ty::ConstS { val: ty::ConstKind::Param(param), ty: expr.ty }); + tcx.mk_const(ty::ConstS { kind: ty::ConstKind::Param(param), ty: expr.ty }); let literal = ConstantKind::Ty(const_param); Constant { user_ty: None, span, literal } diff --git a/compiler/rustc_mir_build/src/thir/pattern/deconstruct_pat.rs b/compiler/rustc_mir_build/src/thir/pattern/deconstruct_pat.rs index b7de3f28872..26532ae33d0 100644 --- a/compiler/rustc_mir_build/src/thir/pattern/deconstruct_pat.rs +++ b/compiler/rustc_mir_build/src/thir/pattern/deconstruct_pat.rs @@ -153,7 +153,7 @@ impl IntRange { return None; } } - mir::ConstantKind::Ty(c) => match c.val() { + mir::ConstantKind::Ty(c) => match c.kind() { ty::ConstKind::Value(_) => bug!( "encountered ConstValue in mir::ConstantKind::Ty, whereas this is expected to be in ConstantKind::Val" ), diff --git a/compiler/rustc_mir_build/src/thir/pattern/mod.rs b/compiler/rustc_mir_build/src/thir/pattern/mod.rs index 417cf0f89c4..83175439b70 100644 --- a/compiler/rustc_mir_build/src/thir/pattern/mod.rs +++ b/compiler/rustc_mir_build/src/thir/pattern/mod.rs @@ -553,7 +553,7 @@ impl<'a, 'tcx> PatCtxt<'a, 'tcx> { match value { mir::ConstantKind::Ty(c) => { - match c.val() { + match c.kind() { ConstKind::Param(_) => { self.errors.push(PatternError::ConstParamInPattern(span)); return PatKind::Wild; |
