diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2022-11-28 12:38:15 +0000 |
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2022-11-28 17:28:30 +0000 |
| commit | f4d00fe78550eac378594a9c0d0708a6c871f337 (patch) | |
| tree | 264e545c947dd8efed6735f62c951785ff9322bb /compiler/rustc_trait_selection | |
| parent | 26b87bf8ff8406e80e70559b71cf0095475cc64a (diff) | |
| download | rust-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')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/auto_trait.rs | 4 |
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; |
