about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/traits
diff options
context:
space:
mode:
authorMaybe Waffle <waffle.lapkin@gmail.com>2022-11-28 12:38:15 +0000
committerMaybe Waffle <waffle.lapkin@gmail.com>2022-11-28 17:28:30 +0000
commitf4d00fe78550eac378594a9c0d0708a6c871f337 (patch)
tree264e545c947dd8efed6735f62c951785ff9322bb /compiler/rustc_trait_selection/src/traits
parent26b87bf8ff8406e80e70559b71cf0095475cc64a (diff)
downloadrust-f4d00fe78550eac378594a9c0d0708a6c871f337.tar.gz
rust-f4d00fe78550eac378594a9c0d0708a6c871f337.zip
Remove `Const::from_value`
...it's just `mk_const` but without the sparcles
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits')
-rw-r--r--compiler/rustc_trait_selection/src/traits/auto_trait.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/auto_trait.rs b/compiler/rustc_trait_selection/src/traits/auto_trait.rs
index 88a13f75c7e..8e04da4f9be 100644
--- a/compiler/rustc_trait_selection/src/traits/auto_trait.rs
+++ b/compiler/rustc_trait_selection/src/traits/auto_trait.rs
@@ -799,9 +799,7 @@ impl<'tcx> AutoTraitFinder<'tcx> {
                                 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;