X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_infer%2Fsrc%2Finfer%2Fcombine.rs;h=67dcb6e708b0e4aab5ff134b34b83f80da501df5;hb=7f605496e75141b473827f3b8d5cdeb17e9f3408;hp=120e57ecebd759a0162cad85fdbc97b566d4e8f2;hpb=9d25bc37446529038255f92c2c461a37d227bb9e;p=rust.git diff --git a/compiler/rustc_infer/src/infer/combine.rs b/compiler/rustc_infer/src/infer/combine.rs index 120e57ecebd..67dcb6e708b 100644 --- a/compiler/rustc_infer/src/infer/combine.rs +++ b/compiler/rustc_infer/src/infer/combine.rs @@ -142,7 +142,7 @@ pub fn super_combine_consts( let a_is_expected = relation.a_is_expected(); - match (a.val(), b.val()) { + match (a.kind(), b.kind()) { ( ty::ConstKind::Infer(InferConst::Var(a_vid)), ty::ConstKind::Infer(InferConst::Var(b_vid)), @@ -726,7 +726,7 @@ fn consts( ) -> RelateResult<'tcx, ty::Const<'tcx>> { assert_eq!(c, c2); // we are abusing TypeRelation here; both LHS and RHS ought to be == - match c.val() { + match c.kind() { ty::ConstKind::Infer(InferConst::Var(vid)) => { let mut inner = self.infcx.inner.borrow_mut(); let variable_table = &mut inner.const_unification_table(); @@ -761,7 +761,7 @@ fn consts( )?; Ok(self.tcx().mk_const(ty::ConstS { ty: c.ty(), - val: ty::ConstKind::Unevaluated(ty::Unevaluated { def, substs, promoted }), + kind: ty::ConstKind::Unevaluated(ty::Unevaluated { def, substs, promoted }), })) } _ => relate::super_relate_consts(self, c, c), @@ -941,7 +941,7 @@ fn consts( debug_assert_eq!(c, _c); debug!("ConstInferUnifier: c={:?}", c); - match c.val() { + match c.kind() { ty::ConstKind::Infer(InferConst::Var(vid)) => { // Check if the current unification would end up // unifying `target_vid` with a const which contains @@ -992,7 +992,7 @@ fn consts( )?; Ok(self.tcx().mk_const(ty::ConstS { ty: c.ty(), - val: ty::ConstKind::Unevaluated(ty::Unevaluated { def, substs, promoted }), + kind: ty::ConstKind::Unevaluated(ty::Unevaluated { def, substs, promoted }), })) } _ => relate::super_relate_consts(self, c, c),