forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rustdoc-json: Add test for
impl Trait for dyn Trait
- Loading branch information
1 parent
1555074
commit b5d73fc
Showing
1 changed file
with
15 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,15 @@ | ||
//@ set t1 = '$.index[*][?(@.name=="T1")].id' | ||
pub trait T1 {} | ||
|
||
//@ set t2 = '$.index[*][?(@.name=="T2")].id' | ||
pub trait T2 {} | ||
|
||
/// Fun impl | ||
impl T1 for dyn T2 {} | ||
|
||
//@ set impl = '$.index[*][?(@.docs=="Fun impl")].id' | ||
//@ is '$.index[*][?(@.name=="T1")].inner.trait.implementations[*]' $impl | ||
//@ is '$.index[*][?(@.name=="T2")].inner.trait.implementations' [] | ||
|
||
//@ is '$.index[*][?(@.docs=="Fun impl")].inner.impl.trait.id' $t1 | ||
//@ is '$.index[*][?(@.docs=="Fun impl")].inner.impl.for.dyn_trait.traits[*].trait.id' $t2 |