about summary refs log tree commit diff
path: root/tests/ui/async-await/async-closures/def-path.rs
blob: 838556966e86560c8c144165963defde0402a011 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//@ 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}<
}