]> git.proxmox.com Git - rustc.git/blob - src/test/ui/mismatched_types/dont-point-return-on-E0308.rs
New upstream version 1.65.0+dfsg1
[rustc.git] / src / test / ui / mismatched_types / dont-point-return-on-E0308.rs
1 // edition:2021
2
3 async fn f(_: &()) {}
4 //~^ NOTE function defined here
5 //~| NOTE
6 // Second note is the span of the underlined argument, I think...
7
8 fn main() {
9 (|| async {
10 Err::<(), ()>(())?;
11 f(());
12 //~^ ERROR mismatched types
13 //~| NOTE arguments to this function are incorrect
14 //~| NOTE expected `&()`, found `()`
15 //~| HELP consider borrowing here
16 Ok::<(), ()>(())
17 })();
18 }