Skip to content

Commit

Permalink
rustdoc-json: Add assoc type ICE regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
Enselic committed Jun 28, 2022
1 parent 5ffa8f6 commit ae4b929
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/test/rustdoc-json/assoc_type.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Regression test for <https://github.com/rust-lang/rust/issues/98547>.

// @has assoc_type.json
// @has - "$.index[*][?(@.name=='Trait')]"
// @has - "$.index[*][?(@.name=='AssocType')]"
// @has - "$.index[*][?(@.name=='S')]"

pub trait Trait {
type AssocType;
}

impl<T> Trait for T {
type AssocType = Self;
}

pub struct S;

0 comments on commit ae4b929

Please sign in to comment.