forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add regression test for rust-lang#97986
- Loading branch information
1 parent
a752f82
commit 99cd9ca
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |