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.
|
2024-07-19 09:50:47 -05:00
|
|
|
//@ set wham = "$.index[*][?(@.name=='Wham')].id"
|
|
|
|
//@ set gmWham = "$.index[*][?(@.docs=='Wham for George Michael')].id"
|
|
|
|
//@ set gm = "$.index[*][?(@.name=='GeorgeMichael')].id"
|
2023-11-07 10:56:03 -06:00
|
|
|
|
|
|
|
// Both struct and trait point to impl.
|
2024-07-19 09:50:47 -05:00
|
|
|
//@ has "$.index[*][?(@.name=='GeorgeMichael')].inner.struct.impls[*]" $gmWham
|
|
|
|
//@ is "$.index[*][?(@.name=='Wham')].inner.trait.implementations[*]" $gmWham
|
2023-11-07 10:56:03 -06:00
|
|
|
|
|
|
|
// Impl points to both struct and trait.
|
2024-07-19 09:50:47 -05:00
|
|
|
//@ 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
|