]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc-json/generic_impl.rs
Merge commit '7d53619064ab7045c383644cb445052d2a3d46db' into sync_cg_clif-2023-02-09
[rust.git] / tests / rustdoc-json / generic_impl.rs
1 // Regression test for <https://github.com/rust-lang/rust/issues/97986>.
2
3 // @has "$.index[*][?(@.name=='f')]"
4 // @has "$.index[*][?(@.name=='AssocTy')]"
5 // @has "$.index[*][?(@.name=='AssocConst')]"
6
7 pub mod m {
8     pub struct S;
9 }
10
11 pub trait F {
12     type AssocTy;
13     const AssocConst: usize;
14     fn f() -> m::S;
15 }
16
17 impl<T> F for T {
18     type AssocTy = u32;
19     const AssocConst: usize = 0;
20     fn f() -> m::S {
21         m::S
22     }
23 }