Relax constrained generics to TypeVisitable
This commit is contained in:
parent
f66c06f7f2
commit
e9e5d0685b
23 changed files with 56 additions and 43 deletions
|
@ -25,6 +25,7 @@ use rustc_middle::ty::error::{ExpectedFound, TypeError};
|
|||
use rustc_middle::ty::fold::{TypeFoldable, TypeFolder, TypeSuperFoldable};
|
||||
use rustc_middle::ty::relate::RelateResult;
|
||||
use rustc_middle::ty::subst::{GenericArg, GenericArgKind, InternalSubsts, SubstsRef};
|
||||
use rustc_middle::ty::visit::TypeVisitable;
|
||||
pub use rustc_middle::ty::IntVarValue;
|
||||
use rustc_middle::ty::{self, GenericParamDefKind, InferConst, Ty, TyCtxt};
|
||||
use rustc_middle::ty::{ConstVid, FloatVid, IntVid, TyVid};
|
||||
|
@ -1438,7 +1439,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
|||
/// `resolve_vars_if_possible()`.
|
||||
pub fn unresolved_type_vars<T>(&self, value: &T) -> Option<(Ty<'tcx>, Option<Span>)>
|
||||
where
|
||||
T: TypeFoldable<'tcx>,
|
||||
T: TypeVisitable<'tcx>,
|
||||
{
|
||||
value.visit_with(&mut resolve::UnresolvedTypeFinder::new(self)).break_value()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue