blob: cb03d0ea4cca39ad570f9668ecafcfea8dc5a5b6 [file] [log] [blame]
error[E0271]: type mismatch resolving `for<'r> <[closure@$DIR/closure-mismatch.rs:18:9: 18:15] as std::ops::FnOnce<(&'r (),)>>::Output == ()`
--> $DIR/closure-mismatch.rs:18:5
|
LL | baz(|_| ()); //~ ERROR type mismatch
| ^^^ expected bound lifetime parameter, found concrete lifetime
|
= note: required because of the requirements on the impl of `Foo` for `[closure@$DIR/closure-mismatch.rs:18:9: 18:15]`
note: required by `baz`
--> $DIR/closure-mismatch.rs:15:1
|
LL | fn baz<T: Foo>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^
error[E0631]: type mismatch in closure arguments
--> $DIR/closure-mismatch.rs:18:5
|
LL | baz(|_| ()); //~ ERROR type mismatch
| ^^^ ------ found signature of `fn(_) -> _`
| |
| expected signature of `for<'r> fn(&'r ()) -> _`
|
= note: required because of the requirements on the impl of `Foo` for `[closure@$DIR/closure-mismatch.rs:18:9: 18:15]`
note: required by `baz`
--> $DIR/closure-mismatch.rs:15:1
|
LL | fn baz<T: Foo>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors
Some errors occurred: E0271, E0631.
For more information about an error, try `rustc --explain E0271`.