Function rustc_typeck::outlives::implicit_infer::check_explicit_predicates[][src]

pub fn check_explicit_predicates<'tcx>(
    tcx: TyCtxt<'_, 'tcx, 'tcx>,
    def_id: &DefId,
    substs: &[Kind<'tcx>],
    required_predicates: &mut BTreeSet<OutlivesPredicate<Kind<'tcx>, Region<'tcx>>>,
    explicit_map: &mut ExplicitPredicatesMap<'tcx>,
    ignore_self_ty: bool
)
🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

We also have to check the explicit predicates declared on the type.

struct Foo<'a, T> {
    field1: Bar<T>
}

struct Bar<U> where U: 'static, U: Foo {
    ...
}

Here, we should fetch the explicit predicates, which will give us U: 'static and U: Foo. The latter we can ignore, but we will want to process U: 'static, applying the substitution as above.