]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-json/assoc_type.rs
Rollup merge of #100211 - cjgillot:ctfe-mir-available, r=michaelwoerister
[rust.git] / src / test / rustdoc-json / assoc_type.rs
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;