Function rustc_typeck::collect::predicates_from_bound
source · [−]fn predicates_from_bound<'tcx>(
astconv: &dyn AstConv<'tcx>,
param_ty: Ty<'tcx>,
bound: &'tcx GenericBound<'tcx>,
bound_vars: &'tcx List<BoundVariableKind>
) -> Vec<(Predicate<'tcx>, Span)>
Expand description
Converts a specific GenericBound
from the AST into a set of
predicates that apply to the self type. A vector is returned
because this can be anywhere from zero predicates (T: ?Sized
adds no
predicates) to one (T: Foo
) to many (T: Bar<X = i32>
adds T: Bar
and <T as Bar>::X == i32
).