Function rustc_hir_analysis::check::wfcheck::gather_gat_bounds

source ·
fn gather_gat_bounds<'tcx, T: TypeFoldable<TyCtxt<'tcx>>>(
    tcx: TyCtxt<'tcx>,
    param_env: ParamEnv<'tcx>,
    item_def_id: LocalDefId,
    to_check: T,
    wf_tys: &FxIndexSet<Ty<'tcx>>,
    gat_def_id: LocalDefId,
    gat_generics: &'tcx Generics,
) -> Option<FxHashSet<Clause<'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>;
}