1
Fork 0
rust/src/test/ui/async-await/issue-61076.rs

13 lines
228 B
Rust
Raw Normal View History

2020-05-06 18:43:56 +08:00
// edition:2018
async fn foo() -> Result<(), ()> {
Ok(())
}
async fn bar() -> Result<(), ()> {
2020-05-10 22:34:20 +08:00
foo()?; //~ ERROR the `?` operator can only be applied to values that implement `std::ops::Try`
2020-05-06 18:43:56 +08:00
Ok(())
}
fn main() {}