]>
Commit | Line | Data |
---|---|---|
0731742a XL |
1 | error[E0271]: type mismatch resolving `for<'r> <[closure@$DIR/closure-mismatch.rs:8:9: 8:15] as std::ops::FnOnce<(&'r (),)>>::Output == ()` |
2 | --> $DIR/closure-mismatch.rs:8:5 | |
7cac9316 | 3 | | |
532ac7d7 | 4 | LL | baz(|_| ()); |
7cac9316 XL |
5 | | ^^^ expected bound lifetime parameter, found concrete lifetime |
6 | | | |
0731742a | 7 | = note: required because of the requirements on the impl of `Foo` for `[closure@$DIR/closure-mismatch.rs:8:9: 8:15]` |
2c00a5a8 | 8 | note: required by `baz` |
0731742a | 9 | --> $DIR/closure-mismatch.rs:5:1 |
2c00a5a8 | 10 | | |
0531ce1d | 11 | LL | fn baz<T: Foo>(_: T) {} |
2c00a5a8 | 12 | | ^^^^^^^^^^^^^^^^^^^^ |
7cac9316 | 13 | |
ea8adc8c | 14 | error[E0631]: type mismatch in closure arguments |
0731742a | 15 | --> $DIR/closure-mismatch.rs:8:5 |
7cac9316 | 16 | | |
532ac7d7 | 17 | LL | baz(|_| ()); |
ea8adc8c | 18 | | ^^^ ------ found signature of `fn(_) -> _` |
7cac9316 | 19 | | | |
ea8adc8c | 20 | | expected signature of `for<'r> fn(&'r ()) -> _` |
7cac9316 | 21 | | |
0731742a | 22 | = note: required because of the requirements on the impl of `Foo` for `[closure@$DIR/closure-mismatch.rs:8:9: 8:15]` |
2c00a5a8 | 23 | note: required by `baz` |
0731742a | 24 | --> $DIR/closure-mismatch.rs:5:1 |
2c00a5a8 | 25 | | |
0531ce1d | 26 | LL | fn baz<T: Foo>(_: T) {} |
2c00a5a8 | 27 | | ^^^^^^^^^^^^^^^^^^^^ |
7cac9316 | 28 | |
041b39d2 | 29 | error: aborting due to 2 previous errors |
7cac9316 | 30 | |
48663c56 | 31 | For more information about this error, try `rustc --explain E0271`. |