2020-05-30 04:48:54 -05:00
|
|
|
// edition:2018
|
2021-09-19 11:57:19 -05:00
|
|
|
// incremental
|
2020-05-30 04:48:54 -05:00
|
|
|
|
|
|
|
pub struct SadGirl;
|
|
|
|
|
|
|
|
impl SadGirl {
|
|
|
|
pub async fn call(&self) -> Result<(), ()> {
|
|
|
|
Ok(())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
async fn async_main() -> Result<(), ()> {
|
|
|
|
// should be `.call().await?`
|
|
|
|
SadGirl {}.call()?; //~ ERROR: the `?` operator can only be applied to values
|
|
|
|
Ok(())
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let _ = async_main();
|
|
|
|
}
|