fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
571 B28 linesraw
1// edition:2021
2// run-rustfix
3
4#![feature(async_fn_in_trait, return_position_impl_trait_in_trait)]
5
6trait Trait {
7    #[allow(async_fn_in_trait)]
8    async fn foo();
9
10    #[allow(async_fn_in_trait)]
11    async fn bar() -> i32;
12
13    fn test(&self) -> impl Sized + '_;
14
15    #[allow(async_fn_in_trait)]
16    async fn baz(&self) -> &i32;
17}
18
19struct S;
20
21impl Trait for S {async fn baz(&self) -> &i32 { todo!() }
22fn test(&self) -> impl Sized + '_ { todo!() }
23async fn bar() -> i32 { todo!() }
24async fn foo() { todo!() }
25}
26//~^ ERROR not all trait items implemented
27
28fn main() {}