2022-03-13 23:37:04 +00:00
|
|
|
pub trait Wham {}
|
|
|
|
pub struct GeorgeMichael {}
|
|
|
|
|
2023-11-07 16:56:03 +00:00
|
|
|
/// Wham for George Michael
|
2022-03-13 23:37:04 +00:00
|
|
|
impl Wham for GeorgeMichael {}
|
2023-11-07 16:56:03 +00:00
|
|
|
|
|
|
|
// Find IDs.
|
2025-03-20 23:01:32 +00: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 16:56:03 +00:00
|
|
|
|
|
|
|
// Both struct and trait point to impl.
|
2025-03-20 23:01:32 +00:00
|
|
|
//@ has "$.index[?(@.name=='GeorgeMichael')].inner.struct.impls[*]" $gmWham
|
|
|
|
//@ is "$.index[?(@.name=='Wham')].inner.trait.implementations[*]" $gmWham
|
2023-11-07 16:56:03 +00:00
|
|
|
|
|
|
|
// Impl points to both struct and trait.
|
2025-03-20 23:01:32 +00: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
|