Relax constrained generics to TypeVisitable
This commit is contained in:
parent
f66c06f7f2
commit
e9e5d0685b
23 changed files with 56 additions and 43 deletions
|
@ -1,5 +1,7 @@
|
|||
use rustc_middle::mir::interpret::InterpResult;
|
||||
use rustc_middle::ty::{self, Ty, TyCtxt, TypeFoldable, TypeSuperFoldable, TypeVisitor};
|
||||
use rustc_middle::ty::{
|
||||
self, Ty, TyCtxt, TypeFoldable, TypeSuperFoldable, TypeVisitable, TypeVisitor,
|
||||
};
|
||||
use std::convert::TryInto;
|
||||
use std::ops::ControlFlow;
|
||||
|
||||
|
@ -10,7 +12,7 @@ use std::ops::ControlFlow;
|
|||
/// case these parameters are unused.
|
||||
pub(crate) fn ensure_monomorphic_enough<'tcx, T>(tcx: TyCtxt<'tcx>, ty: T) -> InterpResult<'tcx>
|
||||
where
|
||||
T: TypeFoldable<'tcx>,
|
||||
T: TypeVisitable<'tcx>,
|
||||
{
|
||||
debug!("ensure_monomorphic_enough: ty={:?}", ty);
|
||||
if !ty.needs_subst() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue