rust/tests/ui/async-await/field-in-sync.rs
2024-10-12 06:14:46 -04:00

14 lines
207 B
Rust

//@ edition: 2021
struct S {
field: (),
}
async fn foo() -> S { todo!() }
fn main() -> Result<(), ()> {
foo().field;
//~^ ERROR no field `field` on type `impl Future<Output = S>`
Ok(())
}