2024-01-27 00:50:31 +00:00
error[E0308]: mismatched types
2024-11-06 17:53:59 +00:00
--> $DIR/def-path.rs:7:9
2024-01-27 00:50:31 +00:00
|
LL | let x = async || {};
| -- the expected `async` closure body
LL |
LL | let () = x();
2024-12-25 01:08:59 +00:00
| ^^ --- this expression has type `{static main::{closure#0}::{closure#0}<?17t> upvar_tys=?16t resume_ty=ResumeTy yield_ty=() return_ty=() witness=?6t}`
2024-01-27 00:50:31 +00:00
| |
| expected `async` closure body, found `()`
|
2024-12-25 01:08:59 +00:00
= note: expected `async` closure body `{static main::{closure#0}::{closure#0}<?17t> upvar_tys=?16t resume_ty=ResumeTy yield_ty=() return_ty=() witness=?6t}`
2024-01-27 00:50:31 +00:00
found unit type `()`
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.