]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_infer/src/infer/combine.rs
Auto merge of #105094 - Swatinem:generator-not-future, r=compiler-errors
[rust.git] / compiler / rustc_infer / src / infer / combine.rs
index eec938cefbb70a0494b1e0f000c3a3338c174236..cf895ed0d3e598ba23eb5effcb52345e75982045 100644 (file)
@@ -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),
         }