7 fn id<T>(value: &'a T) -> &'static T;
10 impl Trait<'static> for () {
11 fn id<T>(value: &'static T) -> &'static T {
16 fn could_use_implied_bounds<'a, T>(_: Foo<'a>, x: &'a T) -> &'static T
18 (): Trait<'a>, // This could be an implied bound
24 let bar: for<'a, 'b> fn(Foo<'a>, &'b ()) = |_, _| {};
26 // If `could_use_implied_bounds` were to use implied bounds,
27 // keeping 'a late-bound, then we could assign that function
29 let bar: for<'a> fn(Foo<'a>, &'a ()) = bar;
31 // In this case, the subtyping relation here would be unsound,
32 // allowing us to transmute lifetimes. This currently compiles
33 // because we incorrectly deal with implied bounds inside of binders.
34 let _bar: for<'a, 'b> fn(Foo<'a>, &'b ()) = bar;