]> git.proxmox.com Git - rustc.git/blame - tests/ui/fn/signature-error-reporting-under-verbose.rs
New upstream version 1.69.0+dfsg1
[rustc.git] / tests / ui / fn / signature-error-reporting-under-verbose.rs
CommitLineData
487cf647
FG
1// compile-flags: -Zverbose
2
3fn foo(_: i32, _: i32) {}
4
5fn needs_ptr(_: fn(i32, u32)) {}
6//~^ NOTE function defined here
7//~| NOTE
8
9fn main() {
10 needs_ptr(foo);
11 //~^ ERROR mismatched types
9ffffee4 12 //~| NOTE expected fn pointer, found fn item
487cf647
FG
13 //~| NOTE expected fn pointer `fn(i32, u32)`
14 //~| NOTE arguments to this function are incorrect
9ffffee4 15 //~| NOTE when the arguments and return types match, functions can be coerced to function pointers
487cf647 16}