This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
src/test/rustdoc-json/traits Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ // ignore-tidy-linelength
2+
3+ #![ feature( no_core) ]
4+ #![ feature( lang_items) ]
5+ #![ no_core]
6+
7+ // @set loud_id = supertrait.json "$.index[*][?(@.name=='Loud')].id"
8+ pub trait Loud { }
9+
10+ // @set very_loud_id = - "$.index[*][?(@.name=='VeryLoud')].id"
11+ // @count - "$.index[*][?(@.name=='VeryLoud')].inner.bounds[*]" 1
12+ // @is - "$.index[*][?(@.name=='VeryLoud')].inner.bounds[0].trait_bound.trait.inner.id" $loud_id
13+ pub trait VeryLoud : Loud { }
14+
15+ // @set sounds_good_id = - "$.index[*][?(@.name=='SoundsGood')].id"
16+ pub trait SoundsGood { }
17+
18+ // @count - "$.index[*][?(@.name=='MetalBand')].inner.bounds[*]" 2
19+ // @is - "$.index[*][?(@.name=='MetalBand')].inner.bounds[0].trait_bound.trait.inner.id" $very_loud_id
20+ // @is - "$.index[*][?(@.name=='MetalBand')].inner.bounds[1].trait_bound.trait.inner.id" $sounds_good_id
21+ pub trait MetalBand : VeryLoud + SoundsGood { }
22+
23+ // @count - "$.index[*][?(@.name=='DnabLatem')].inner.bounds[*]" 2
24+ // @is - "$.index[*][?(@.name=='DnabLatem')].inner.bounds[1].trait_bound.trait.inner.id" $very_loud_id
25+ // @is - "$.index[*][?(@.name=='DnabLatem')].inner.bounds[0].trait_bound.trait.inner.id" $sounds_good_id
26+ pub trait DnabLatem : SoundsGood + VeryLoud { }
You can’t perform that action at this time.
0 commit comments