mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 03:03:40 +00:00
13 lines
181 B
Rust
13 lines
181 B
Rust
// edition:2018
|
|
|
|
struct S<'a>(&'a i32);
|
|
|
|
impl<'a> S<'a> {
|
|
async fn new(i: &'a i32) -> Result<Self, ()> {
|
|
//~^ ERROR: `async fn`
|
|
Ok(S(&22))
|
|
}
|
|
}
|
|
|
|
fn main() {}
|