]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc-json/generic_impl.rs
Rollup merge of #107580 - lenko-d:default_value_for_a_lifetime_generic_parameter_prod...
[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 }