Function implied_predicates

Source
pub fn implied_predicates<'tcx>(
    tcx: TyCtxt<'tcx>,
    def_id: DefId,
    options: BoundsOptions,
) -> GenericPredicates<'tcx>
Expand description

The predicates that can be deduced from the presence of this item in a signature. We only consider predicates implied by traits here, not implied bounds such as &'a T implying T: 'a. E.g.

// `U: OtherTrait` is required, `Self: Sized` is implied.
trait Trait<U: OtherTrait>: Sized {
    // `T: Clone` is required, `Self::Type<T>: Debug` is implied.
    type Type<T: Clone>: Debug;
}

If add_drop is true, we add a T: Drop bound for every type generic and associated type.