Skip to content

Commit

Permalink
Add regression test for rust-lang#97986
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jun 13, 2022
1 parent a752f82 commit 99cd9ca
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/test/rustdoc-json/generic_impl.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Regression test for <https://github.com/rust-lang/rust/issues/97986>.

// @has generic_impl.json
// @has - "$.index[*][?(@.name=='f')]"
// @has - "$.index[*][?(@.name=='AssocTy')]"
// @has - "$.index[*][?(@.name=='AssocConst')]"

pub mod m {
pub struct S;
}

pub trait F {
type AssocTy;
const AssocConst: usize;
fn f() -> m::S;
}

impl<T> F for T {
type AssocTy = u32;
const AssocConst: usize = 0;
fn f() -> m::S {
m::S
}
}

0 comments on commit 99cd9ca

Please sign in to comment.