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
4 LL | baz(|_| ()); //~ ERROR type mismatch
5 | ^^^ expected bound lifetime parameter, found concrete lifetime
7 = note: required because of the requirements on the impl of `Foo` for `[closure@$DIR/closure-mismatch.rs:18:9: 18:15]`
8 note: required by `baz`
9 --> $DIR/closure-mismatch.rs:15:1
11 LL | fn baz<T: Foo>(_: T) {}
12 | ^^^^^^^^^^^^^^^^^^^^
14 error[E0631]: type mismatch in closure arguments
15 --> $DIR/closure-mismatch.rs:18:5
17 LL | baz(|_| ()); //~ ERROR type mismatch
18 | ^^^ ------ found signature of `fn(_) -> _`
20 | expected signature of `for<'r> fn(&'r ()) -> _`
22 = note: required because of the requirements on the impl of `Foo` for `[closure@$DIR/closure-mismatch.rs:18:9: 18:15]`
23 note: required by `baz`
24 --> $DIR/closure-mismatch.rs:15:1
26 LL | fn baz<T: Foo>(_: T) {}
27 | ^^^^^^^^^^^^^^^^^^^^
29 error: aborting due to 2 previous errors
31 Some errors occurred: E0271, E0631.
32 For more information about an error, try `rustc --explain E0271`.