2022-03-13 18:37:04 -05:00
|
|
|
pub trait Wham {}
|
|
|
|
pub struct GeorgeMichael {}
|
|
|
|
|
2023-11-07 10:56:03 -06:00
|
|
|
/// Wham for George Michael
|
2022-03-13 18:37:04 -05:00
|
|
|
impl Wham for GeorgeMichael {}
|
2023-11-07 10:56:03 -06:00
|
|
|
|
|
|
|
// Find IDs.
|
|
|
|
// @set wham = "$.index[*][?(@.name=='Wham')].id"
|
|
|
|
// @set gmWham = "$.index[*][?(@.docs=='Wham for George Michael')].id"
|
|
|
|
// @set gm = "$.index[*][?(@.name=='GeorgeMichael')].id"
|
|
|
|
|
|
|
|
// Both struct and trait point to impl.
|
|
|
|
// @has "$.index[*][?(@.name=='GeorgeMichael')].inner.struct.impls[*]" $gmWham
|
|
|
|
// @is "$.index[*][?(@.name=='Wham')].inner.trait.implementations[*]" $gmWham
|
|
|
|
|
|
|
|
// Impl points to both struct and trait.
|
|
|
|
// @is "$.index[*][?(@.docs == 'Wham for George Michael')].inner.impl.trait.id" $wham
|
|
|
|
// @is "$.index[*][?(@.docs == 'Wham for George Michael')].inner.impl.for.resolved_path.id" $gm
|