]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc-json/traits/implementors.rs
Rollup merge of #107687 - cjgillot:sroa-2, r=oli-obk
[rust.git] / tests / rustdoc-json / traits / implementors.rs
1 #![feature(no_core)]
2 #![no_core]
3
4 // @set wham = "$.index[*][?(@.name=='Wham')].id"
5 // @count "$.index[*][?(@.name=='Wham')].inner.implementations[*]" 1
6 // @set gmWham = "$.index[*][?(@.name=='Wham')].inner.implementations[0]"
7 pub trait Wham {}
8
9 // @count "$.index[*][?(@.name=='GeorgeMichael')].inner.impls[*]" 1
10 // @is "$.index[*][?(@.name=='GeorgeMichael')].inner.impls[0]" $gmWham
11 // @set gm = "$.index[*][?(@.name=='Wham')].id"
12
13 // jsonpath_lib isnt expressive enough (for now) to get the "impl" item, so we
14 // just check it isn't pointing to the type, but when you port to jsondocck-ng
15 // check what the impl item is
16 // @!is "$.index[*][?(@.name=='Wham')].inner.implementations[0]" $gm
17 pub struct GeorgeMichael {}
18
19 impl Wham for GeorgeMichael {}