Relax constrained generics to TypeVisitable
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user