summaryrefslogtreecommitdiffstats
path: root/src/test/ui/async-await/issue-84841.rs
blob: ba3a1617b9c1d57fe4c2f97c3d5c12225ec979af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// edition:2018

fn main() {

}

async fn foo() {
    // Adding an .await here avoids the ICE
    test()?;
    //~^ ERROR the `?` operator can only be applied to values that implement `Try`
    //~| ERROR the `?` operator can only be used in an async function that returns
}

// Removing the const generic parameter here avoids the ICE
async fn test<const N: usize>() {
}