]> git.lizzy.rs Git - rust.git/blob - src/test/ui/mismatched_types/closure-mismatch.stderr
reorder span labels
[rust.git] / src / test / ui / mismatched_types / closure-mismatch.stderr
1 error[E0271]: type mismatch resolving `for<'r> <[closure@$DIR/closure-mismatch.rs:18:9: 18:15] as std::ops::FnOnce<(&'r (),)>>::Output == ()`
2   --> $DIR/closure-mismatch.rs:18:5
3    |
4 18 |     baz(|_| ());
5    |     ^^^ expected bound lifetime parameter, found concrete lifetime
6    |
7    = note: concrete lifetime that was found is lifetime '_#0r
8    = note: required because of the requirements on the impl of `Foo` for `[closure@$DIR/closure-mismatch.rs:18:9: 18:15]`
9    = note: required by `baz`
10
11 error[E0281]: type mismatch: `[closure@$DIR/closure-mismatch.rs:18:9: 18:15]` implements the trait `std::ops::Fn<(_,)>`, but the trait `for<'r> std::ops::Fn<(&'r (),)>` is required
12   --> $DIR/closure-mismatch.rs:18:5
13    |
14 18 |     baz(|_| ());
15    |     ^^^ ------ implements `std::ops::Fn<(_,)>`
16    |     |
17    |     expected concrete lifetime, found bound lifetime parameter
18    |     requires `for<'r> std::ops::Fn<(&'r (),)>`
19    |
20    = note: required because of the requirements on the impl of `Foo` for `[closure@$DIR/closure-mismatch.rs:18:9: 18:15]`
21    = note: required by `baz`
22
23 error: aborting due to 2 previous errors
24