diff options
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret/util.rs')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/util.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/util.rs b/compiler/rustc_const_eval/src/interpret/util.rs index a16388d5de2..3dde34a6410 100644 --- a/compiler/rustc_const_eval/src/interpret/util.rs +++ b/compiler/rustc_const_eval/src/interpret/util.rs @@ -9,7 +9,7 @@ where T: TypeFoldable<'tcx>, { debug!("ensure_monomorphic_enough: ty={:?}", ty); - if !ty.potentially_needs_subst() { + if !ty.needs_subst() { return Ok(()); } @@ -21,12 +21,8 @@ where impl<'tcx> TypeVisitor<'tcx> for UsedParamsNeedSubstVisitor<'tcx> { type BreakTy = FoundParam; - fn tcx_for_anon_const_substs(&self) -> Option<TyCtxt<'tcx>> { - Some(self.tcx) - } - fn visit_ty(&mut self, ty: Ty<'tcx>) -> ControlFlow<Self::BreakTy> { - if !ty.potentially_needs_subst() { + if !ty.needs_subst() { return ControlFlow::CONTINUE; } @@ -44,7 +40,7 @@ where let is_used = unused_params.contains(index).map_or(true, |unused| !unused); // Only recurse when generic parameters in fns, closures and generators // are used and require substitution. - match (is_used, subst.definitely_needs_subst(self.tcx)) { + match (is_used, subst.needs_subst()) { // Just in case there are closures or generators within this subst, // recurse. (true, true) => return subst.super_visit_with(self), |
