rust/tests/ui/async-await/issue-84841.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
372 B
Rust
Raw Normal View History

2021-07-03 17:32:26 -05:00
// edition:2018
fn main() {
}
async fn foo() {
2021-07-03 17:32:26 -05:00
// 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
2021-07-03 17:32:26 -05:00
}
// Removing the const generic parameter here avoids the ICE
async fn test<const N: usize>() {
}