Skip to content

Commit 99cd9ca

Browse files
Add regression test for #97986
1 parent a752f82 commit 99cd9ca

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/test/rustdoc-json/generic_impl.rs

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
}

0 commit comments

Comments
 (0)