1error[E0308]: mismatched types
2  --> $DIR/closure-mismatch.rs:8:5
3   |
4LL |     baz(|_| ());
5   |     ^^^ lifetime mismatch
6   |
7   = note: expected type `for<'r> Fn<(&'r (),)>`
8              found type `Fn<(&(),)>`
9note: this closure does not fulfill the lifetime requirements
10  --> $DIR/closure-mismatch.rs:8:9
11   |
12LL |     baz(|_| ());
13   |         ^^^^^^
14note: the lifetime requirement is introduced here
15  --> $DIR/closure-mismatch.rs:5:11
16   |
17LL | fn baz<T: Foo>(_: T) {}
18   |           ^^^
19
20error: aborting due to previous error
21
22For more information about this error, try `rustc --explain E0308`.
23