|
| 1 | +error[E0308]: mismatched types |
| 2 | + --> $DIR/placeholder-pattern-fail.rs:9:12 |
| 3 | + | |
| 4 | +LL | let _: for<'a, 'b> fn(Inv<'a>, Inv<'b>) = sub; |
| 5 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other |
| 6 | + | |
| 7 | + = note: expected fn pointer `for<'a, 'b> fn(Inv<'a>, Inv<'b>)` |
| 8 | + found fn pointer `for<'a> fn(Inv<'a>, Inv<'a>)` |
| 9 | + |
| 10 | +error[E0308]: mismatched types |
| 11 | + --> $DIR/placeholder-pattern-fail.rs:9:12 |
| 12 | + | |
| 13 | +LL | let _: for<'a, 'b> fn(Inv<'a>, Inv<'b>) = sub; |
| 14 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other |
| 15 | + | |
| 16 | + = note: expected fn pointer `for<'a, 'b> fn(Inv<'a>, Inv<'b>)` |
| 17 | + found fn pointer `for<'a> fn(Inv<'a>, Inv<'a>)` |
| 18 | + |
| 19 | +error: lifetime may not live long enough |
| 20 | + --> $DIR/placeholder-pattern-fail.rs:14:13 |
| 21 | + | |
| 22 | +LL | fn simple1<'c>(x: (&'c i32,)) { |
| 23 | + | -- lifetime `'c` defined here |
| 24 | +LL | let _x: (&'static i32,) = x; |
| 25 | + | ^^^^^^^^^^^^^^^ type annotation requires that `'c` must outlive `'static` |
| 26 | + |
| 27 | +error: lifetime may not live long enough |
| 28 | + --> $DIR/placeholder-pattern-fail.rs:19:12 |
| 29 | + | |
| 30 | +LL | fn simple2<'c>(x: (&'c i32,)) { |
| 31 | + | -- lifetime `'c` defined here |
| 32 | +LL | let _: (&'static i32,) = x; |
| 33 | + | ^^^^^^^^^^^^^^^ type annotation requires that `'c` must outlive `'static` |
| 34 | + |
| 35 | +error: aborting due to 4 previous errors |
| 36 | + |
| 37 | +For more information about this error, try `rustc --explain E0308`. |
0 commit comments