Function rustc_typeck::check::wfcheck::check_gat_where_clauses[−][src]

fn check_gat_where_clauses(
    tcx: TyCtxt<'_>,
    trait_item: &TraitItem<'_>,
    encl_trait_def_id: DefId
)
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.

This trait will be our running example. We are currently WF checking the Item item…

trait LendingIterator {
  type Item<'me>; // <-- WF checking this trait item

  fn next<'a>(&'a mut self) -> Option<Self::Item<'a>>;
}