Skip to content

Commit 3991e73

Browse files
authored
Rollup merge of #98548 - Enselic:allow-typedef-diff-for-rustdoc-json, r=GuillaumeGomez
rustdoc-json: Allow Typedef to be different in sanity assert Closes #98547 This fix is a natural extension of #98053. r? `@notriddle` (Since you reviewed the other PR.) CC `@GuillaumeGomez` `@rustbot` labels +A-rustdoc-json +T-rustdoc
2 parents 00ebeb8 + 2888e76 commit 3991e73

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/test/rustdoc-json/assoc_type.rs

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Regression test for <https://github.com/rust-lang/rust/issues/98547>.
2+
3+
// @has assoc_type.json
4+
// @has - "$.index[*][?(@.name=='Trait')]"
5+
// @has - "$.index[*][?(@.name=='AssocType')]"
6+
// @has - "$.index[*][?(@.name=='S')]"
7+
// @has - "$.index[*][?(@.name=='S2')]"
8+
9+
pub trait Trait {
10+
type AssocType;
11+
}
12+
13+
impl<T> Trait for T {
14+
type AssocType = Self;
15+
}
16+
17+
pub struct S;
18+
19+
/// Not needed for the #98547 ICE to occur, but added to maximize the chance of
20+
/// getting an ICE in the future. See
21+
/// <https://github.com/rust-lang/rust/pull/98548#discussion_r908219164>
22+
pub struct S2;

0 commit comments

Comments
 (0)