2022-09-11 20:32:47 +01:00
|
|
|
//@ aux-build: foreign_trait.rs
|
|
|
|
extern crate foreign_trait;
|
|
|
|
|
|
|
|
/// ForeignTrait id hack
|
|
|
|
pub use foreign_trait::ForeignTrait as _;
|
2024-08-05 00:44:35 +01:00
|
|
|
//@ set ForeignTrait = "$.index[*][?(@.docs=='ForeignTrait id hack')].inner.use.id"
|
2022-09-11 20:32:47 +01:00
|
|
|
|
|
|
|
pub struct LocalStruct;
|
2024-07-19 16:50:47 +02:00
|
|
|
//@ set LocalStruct = "$.index[*][?(@.name=='LocalStruct')].id"
|
2022-09-11 20:32:47 +01:00
|
|
|
|
|
|
|
/// foreign for local
|
|
|
|
impl foreign_trait::ForeignTrait for LocalStruct {}
|
|
|
|
|
2024-07-19 16:50:47 +02:00
|
|
|
//@ set impl = "$.index[*][?(@.docs=='foreign for local')].id"
|
|
|
|
//@ is "$.index[*][?(@.docs=='foreign for local')].inner.impl.for.resolved_path.id" $LocalStruct
|
|
|
|
//@ is "$.index[*][?(@.docs=='foreign for local')].inner.impl.trait.id" $ForeignTrait
|
2022-09-11 20:32:47 +01:00
|
|
|
|
2024-07-19 16:50:47 +02:00
|
|
|
//@ has "$.index[*][?(@.name=='LocalStruct')].inner.struct.impls[*]" $impl
|