summary refs log tree commit diff
path: root/tests/rustdoc-json/impls/local_for_foreign.rs
blob: 019f7d625cb259aece3229b1752573f28fec96bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//@ aux-build: foreign_struct.rs
extern crate foreign_struct;

/// ForeignStruct id hack
pub use foreign_struct::ForeignStruct as _;
// @set ForeignStruct = "$.index[*][?(@.docs=='ForeignStruct id hack')].inner.import.id"

pub trait LocalTrait {}
// @set LocalTrait = "$.index[*][?(@.name=='LocalTrait')].id"

/// local for foreign
impl LocalTrait for foreign_struct::ForeignStruct {}

// @set impl = "$.index[*][?(@.docs=='local for foreign')].id"
// @is "$.index[*][?(@.docs=='local for foreign')].inner.impl.trait.id" $LocalTrait
// @is "$.index[*][?(@.docs=='local for foreign')].inner.impl.for.resolved_path.id" $ForeignStruct

// @is "$.index[*][?(@.name=='LocalTrait')].inner.trait.implementations[*]" $impl