| 1 | mod typesrust-analyzer cargo inherent 1.0.13 types/ { |
| 2 | use inherentrust-analyzer cargo inherent 1.0.13 crate/::inherentrust-analyzer cargo inherent 1.0.13 inherent:; |
| 3 | |
| 4 | trait Traitrust-analyzer cargo inherent 1.0.13 types/Trait# { |
| 5 | fn frust-analyzer cargo inherent 1.0.13 types/Trait#f().<T: ?Sizedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sized#>(self); |
| 6 | // A default method |
| 7 | fn grust-analyzer cargo inherent 1.0.13 types/Trait#g().(&self) {} |
| 8 | |
| 9 | #[rustversionrust-analyzer cargo rustversion 1.0.22 crate/::sincerust-analyzer cargo rustversion 1.0.22 since:(1.75)] |
| 10 | async fn arust-analyzer cargo inherent 1.0.13 types/Trait#a().(&self); |
| 11 | } |
| 12 | |
| 13 | pub struct Structrust-analyzer cargo inherent 1.0.13 types/Struct#; |
| 14 | |
| 15 | #[inherentrust-analyzer cargo inherent 1.0.13 inherent:] |
| 16 | impl Traitrust-analyzer cargo inherent 1.0.13 types/Trait# for Structrust-analyzer cargo inherent 1.0.13 types/Struct# { |
| 17 | pub fn frust-analyzer cargo inherent 1.0.13 types/impl#[Struct]f().<T: ?Sizedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sized#>(self) {} |
| 18 | pub fn grust-analyzer cargo inherent 1.0.13 types/impl#[Struct]g().(&self); |
| 19 | |
| 20 | #[rustversionrust-analyzer cargo rustversion 1.0.22 crate/::sincerust-analyzer cargo rustversion 1.0.22 since:(1.75)] |
| 21 | pub async fn arust-analyzer cargo inherent 1.0.13 types/impl#[Struct][Trait]a().(&self) {} |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 26 | fn testrust-analyzer cargo inherent 1.0.13 test().() { |
| 27 | // types::Trait is not in scope. |
| 28 | let s = typesrust-analyzer cargo inherent 1.0.13 types/::Structrust-analyzer cargo inherent 1.0.13 types/Struct#; |
| 29 | s.grust-analyzer cargo inherent 1.0.13 types/impl#[Struct]g().(); |
| 30 | s.frust-analyzer cargo inherent 1.0.13 types/impl#[Struct]f().::<str>(); |
| 31 | } |
| 32 | |
| 33 | #[rustversionrust-analyzer cargo rustversion 1.0.22 crate/::sincerust-analyzer cargo rustversion 1.0.22 since:(1.75)] |
| 34 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 35 | fn test_asyncrust-analyzer cargo inherent 1.0.13 test_async().() { |
| 36 | fn assert_futurerust-analyzer cargo inherent 1.0.13 assert_future().<T: stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::futurerust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/::Futurerust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#<Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#Output# = ()>>(_: T) {} |
| 37 | |
| 38 | let s = typesrust-analyzer cargo inherent 1.0.13 types/::Structrust-analyzer cargo inherent 1.0.13 types/Struct#; |
| 39 | assert_futurerust-analyzer cargo inherent 1.0.13 assert_future().(s.arust-analyzer cargo inherent 1.0.13 types/impl#[Struct]a().()); |
| 40 | } |