Function rustc_hir_analysis::check::wfcheck::check_gat_where_clauses
source · fn check_gat_where_clauses(tcx: TyCtxt<'_>, associated_items: &[TraitItemRef])
Expand description
Require that the user writes where clauses on GATs for the implicit
outlives bounds involving trait parameters in trait functions and
lifetimes passed as GAT substs. See self-outlives-lint
test.
We use the following trait as an example throughout this function:
ⓘ
trait IntoIter {
type Iter<'a>: Iterator<Item = Self::Item<'a>>;
type Item<'a>;
fn into_iter<'a>(&'a self) -> Self::Iter<'a>;
}