fn gather_gat_bounds<'tcx, T: TypeFoldable<'tcx>>(
    tcx: TyCtxt<'tcx>,
    param_env: ParamEnv<'tcx>,
    item_hir: HirId,
    to_check: T,
    wf_tys: &FxIndexSet<Ty<'tcx>>,
    gat_def_id: LocalDefId,
    gat_generics: &'tcx Generics
) -> Option<FxHashSet<Predicate<'tcx>>>
Expand description

We use the following trait as an example throughout this function. Specifically, let’s assume that to_check here is the return type of into_iter, and the GAT we are checking this for is Iter.

trait IntoIter {
    type Iter<'a>: Iterator<Item = Self::Item<'a>>;
    type Item<'a>;
    fn into_iter<'a>(&'a self) -> Self::Iter<'a>;
}