rust/tests/ui/impl-trait/in-trait/suggest-missing-item.fixed

27 lines
502 B
Rust
Raw Normal View History

// edition:2021
// run-rustfix
trait Trait {
2023-09-26 15:20:25 -05:00
#[allow(async_fn_in_trait)]
async fn foo();
2023-09-26 15:20:25 -05:00
#[allow(async_fn_in_trait)]
async fn bar() -> i32;
fn test(&self) -> impl Sized + '_;
2023-09-26 15:20:25 -05:00
#[allow(async_fn_in_trait)]
async fn baz(&self) -> &i32;
}
struct S;
impl Trait for S {async fn baz(&self) -> &i32 { todo!() }
fn test(&self) -> impl Sized + '_ { todo!() }
async fn bar() -> i32 { todo!() }
async fn foo() { todo!() }
}
//~^ ERROR not all trait items implemented
fn main() {}