blob: d4ccf8d451c12f1114aafab2fa084e50662e3b47 [file] [log] [blame]
error[E0631]: type mismatch in closure arguments
--> $DIR/closure-arg-type-mismatch.rs:3:14
|
LL | a.iter().map(|_: (u32, u32)| 45);
| ^^^ ------------------ found signature of `fn((u32, u32)) -> _`
| |
| expected signature of `fn(&(u32, u32)) -> _`
error[E0631]: type mismatch in closure arguments
--> $DIR/closure-arg-type-mismatch.rs:4:14
|
LL | a.iter().map(|_: &(u16, u16)| 45);
| ^^^ ------------------- found signature of `for<'r> fn(&'r (u16, u16)) -> _`
| |
| expected signature of `fn(&(u32, u32)) -> _`
error[E0631]: type mismatch in closure arguments
--> $DIR/closure-arg-type-mismatch.rs:5:14
|
LL | a.iter().map(|_: (u16, u16)| 45);
| ^^^ ------------------ found signature of `fn((u16, u16)) -> _`
| |
| expected signature of `fn(&(u32, u32)) -> _`
error[E0631]: type mismatch in function arguments
--> $DIR/closure-arg-type-mismatch.rs:10:5
|
LL | baz(f);
| ^^^
| |
| expected signature of `for<'r> fn(*mut &'r u32) -> _`
| found signature of `fn(*mut &'a u32) -> _`
|
note: required by `baz`
--> $DIR/closure-arg-type-mismatch.rs:8:1
|
LL | fn baz<F: Fn(*mut &u32)>(_: F) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0271]: type mismatch resolving `for<'r> <fn(*mut &'a u32) as std::ops::FnOnce<(*mut &'r u32,)>>::Output == ()`
--> $DIR/closure-arg-type-mismatch.rs:10:5
|
LL | baz(f);
| ^^^ expected bound lifetime parameter, found concrete lifetime
|
note: required by `baz`
--> $DIR/closure-arg-type-mismatch.rs:8:1
|
LL | fn baz<F: Fn(*mut &u32)>(_: F) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 5 previous errors
For more information about this error, try `rustc --explain E0271`.