diff options
Diffstat (limited to 'tests/rustdoc-json/impls/foreign_for_local.rs')
-rw-r--r-- | tests/rustdoc-json/impls/foreign_for_local.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/rustdoc-json/impls/foreign_for_local.rs b/tests/rustdoc-json/impls/foreign_for_local.rs new file mode 100644 index 000000000..290c2d571 --- /dev/null +++ b/tests/rustdoc-json/impls/foreign_for_local.rs @@ -0,0 +1,18 @@ +// aux-build: foreign_trait.rs +extern crate foreign_trait; + +/// ForeignTrait id hack +pub use foreign_trait::ForeignTrait as _; +// @set ForeignTrait = "$.index[*][?(@.docs=='ForeignTrait id hack')].inner.id" + +pub struct LocalStruct; +// @set LocalStruct = "$.index[*][?(@.name=='LocalStruct')].id" + +/// foreign for local +impl foreign_trait::ForeignTrait for LocalStruct {} + +// @set impl = "$.index[*][?(@.docs=='foreign for local')].id" +// @is "$.index[*][?(@.docs=='foreign for local')].inner.for.inner.id" $LocalStruct +// @is "$.index[*][?(@.docs=='foreign for local')].inner.trait.id" $ForeignTrait + +// @has "$.index[*][?(@.name=='LocalStruct')].inner.impls[*]" $impl |