]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_trait_selection/src/traits/auto_trait.rs
Auto merge of #105160 - nnethercote:rm-Lit-token_lit, r=petrochenkov
[rust.git] / compiler / rustc_trait_selection / src / traits / auto_trait.rs
index 88a13f75c7eb1865290a70a72957c09e7ddbe16e..8e04da4f9be2479aa584270611a9607279b495d8 100644 (file)
@@ -799,9 +799,7 @@ fn evaluate_nested_obligations(
                                 unevaluated,
                                 Some(obligation.cause.span),
                             ) {
-                                Ok(Some(valtree)) => {
-                                    Ok(ty::Const::from_value(selcx.tcx(), valtree, c.ty()))
-                                }
+                                Ok(Some(valtree)) => Ok(selcx.tcx().mk_const(valtree, c.ty())),
                                 Ok(None) => {
                                     let tcx = self.tcx;
                                     let def_id = unevaluated.def.did;