X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_infer%2Fsrc%2Finfer%2Fcombine.rs;h=cf895ed0d3e598ba23eb5effcb52345e75982045;hb=d1449560e31f7f801d81268a3dad783181656dff;hp=eec938cefbb70a0494b1e0f000c3a3338c174236;hpb=872631d0f0fadffe3220ab1bd9c8f1f2342341e2;p=rust.git diff --git a/compiler/rustc_infer/src/infer/combine.rs b/compiler/rustc_infer/src/infer/combine.rs index eec938cefbb..cf895ed0d3e 100644 --- a/compiler/rustc_infer/src/infer/combine.rs +++ b/compiler/rustc_infer/src/infer/combine.rs @@ -753,7 +753,7 @@ fn consts( origin: var_value.origin, val: ConstVariableValue::Unknown { universe: self.for_universe }, }); - Ok(self.tcx().mk_const_var(new_var_id, c.ty())) + Ok(self.tcx().mk_const(new_var_id, c.ty())) } } } @@ -765,10 +765,7 @@ fn consts( substs, substs, )?; - Ok(self.tcx().mk_const( - ty::ConstKind::Unevaluated(ty::UnevaluatedConst { def, substs }), - c.ty(), - )) + Ok(self.tcx().mk_const(ty::UnevaluatedConst { def, substs }, c.ty())) } _ => relate::super_relate_consts(self, c, c), } @@ -975,7 +972,7 @@ fn consts( }, }, ); - Ok(self.tcx().mk_const_var(new_var_id, c.ty())) + Ok(self.tcx().mk_const(new_var_id, c.ty())) } } } @@ -988,10 +985,7 @@ fn consts( substs, )?; - Ok(self.tcx().mk_const( - ty::ConstKind::Unevaluated(ty::UnevaluatedConst { def, substs }), - c.ty(), - )) + Ok(self.tcx().mk_const(ty::UnevaluatedConst { def, substs }, c.ty())) } _ => relate::super_relate_consts(self, c, c), }