blob: c41bece3c196fd2becd3c5745064363bfe4a91bf [file] [log] [blame]
error[E0308]: mismatched types
--> $DIR/closure-mismatch.rs:8:5
|
LL | baz(|_| ());
| ^^^ lifetime mismatch
|
= note: expected type `for<'r> Fn<(&'r (),)>`
found type `Fn<(&(),)>`
note: this closure does not fulfill the lifetime requirements
--> $DIR/closure-mismatch.rs:8:9
|
LL | baz(|_| ());
| ^^^^^^
note: the lifetime requirement is introduced here
--> $DIR/closure-mismatch.rs:5:11
|
LL | fn baz<T: Foo>(_: T) {}
| ^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0308`.