2022-12-02 15:01:34 -06:00
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/signature-error-reporting-under-verbose.rs:10:15
|
|
|
|
|
|
|
|
|
LL | needs_ptr(foo);
|
2023-01-02 20:00:33 -06:00
|
|
|
| --------- ^^^ expected fn pointer, found fn item
|
2022-12-02 15:01:34 -06:00
|
|
|
| |
|
|
|
|
| arguments to this function are incorrect
|
|
|
|
|
|
|
|
|
= note: expected fn pointer `fn(i32, u32)`
|
|
|
|
found fn item `fn(i32, i32) {foo}`
|
2023-01-06 14:15:10 -06:00
|
|
|
= note: when the arguments and return types match, functions can be coerced to function pointers
|
2022-12-02 15:01:34 -06:00
|
|
|
note: function defined here
|
|
|
|
--> $DIR/signature-error-reporting-under-verbose.rs:5:4
|
|
|
|
|
|
|
|
|
LL | fn needs_ptr(_: fn(i32, u32)) {}
|
|
|
|
| ^^^^^^^^^ ---------------
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|