1 // Test that `impl MyTrait<'_> for &i32` is equivalent to `impl<'a,
2 // 'b> MyTrait<'a> for &'b i32`.
8 // Equivalent to `Box<dyn Debug + 'static>`:
10 impl StaticTrait for Box<dyn Debug> { }
12 // Equivalent to `Box<dyn Debug + 'static>`:
13 trait NotStaticTrait { }
14 impl NotStaticTrait for Box<dyn Debug + '_> { }
16 fn static_val<T: StaticTrait>(_: T) {
19 fn with_dyn_debug_static<'a>(x: Box<dyn Debug + 'a>) {
20 static_val(x); //~ ERROR E0759
23 fn not_static_val<T: NotStaticTrait>(_: T) {
26 fn with_dyn_debug_not_static<'a>(x: Box<dyn Debug + 'a>) {
27 not_static_val(x); // OK