4 impl<T> Trait<'_, '_> for T {}
6 // `Ordinary<'a> <: Ordinary<'b>` if `'a: 'b`, as with most types.
8 // I am purposefully avoiding the terms co- and contra-variant because
9 // their application to regions depends on how you interpreted Rust
10 // regions. -nikomatsakis
11 struct Ordinary<'a>(&'a u8);
13 // Here we get an error because none of our choices (either `'d` nor `'e`) are outlived
14 // by both `'a` and `'b`.
16 fn upper_bounds<'a, 'b, 'c, 'd, 'e>(a: Ordinary<'a>, b: Ordinary<'b>) -> impl Trait<'d, 'e>
21 // Hidden type `Ordinary<'0>` with constraints:
28 if condition() { a } else { b }
29 //~^ ERROR hidden type for `impl Trait<'d, 'e>` captures lifetime that does not appear in bounds
32 fn condition() -> bool {