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