rust/tests/ui/fn/signature-error-reporting-under-verbose.stderr
Michael Goulet bf66723c0e Test and note unsafe ctor to fn ptr coercion
Also remove a note that I don't consider to be very useful in context.
2023-08-30 15:09:40 -07:00

20 lines
614 B
Plaintext

error[E0308]: mismatched types
--> $DIR/signature-error-reporting-under-verbose.rs:10:15
|
LL | needs_ptr(foo);
| --------- ^^^ expected fn pointer, found fn item
| |
| arguments to this function are incorrect
|
= note: expected fn pointer `fn(i32, u32)`
found fn item `fn(i32, i32) {foo}`
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`.