]> git.proxmox.com Git - rustc.git/blob - tests/rustdoc-json/generic_impl.rs
New upstream version 1.68.2+dfsg1
[rustc.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 }