granite-rust/tests/ui/async-await/async-closures/def-path.rs
2024-12-13 00:04:56 +00:00

12 lines
415 B
Rust

//@ compile-flags: -Zverbose-internals
//@ edition:2021
fn main() {
let x = async || {};
//~^ NOTE the expected `async` closure body
let () = x();
//~^ ERROR mismatched types
//~| NOTE this expression has type `{static main::{closure#0}::{closure#0}<
//~| NOTE expected `async` closure body, found `()`
//~| NOTE expected `async` closure body `{static main::{closure#0}::{closure#0}<
}