about summary refs log tree commit diff
path: root/tests/rustdoc/inline_cross/doc-reachability-impl-31948.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc/inline_cross/doc-reachability-impl-31948.rs')
-rw-r--r--tests/rustdoc/inline_cross/doc-reachability-impl-31948.rs32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/rustdoc/inline_cross/doc-reachability-impl-31948.rs b/tests/rustdoc/inline_cross/doc-reachability-impl-31948.rs
new file mode 100644
index 00000000000..ab0048513c7
--- /dev/null
+++ b/tests/rustdoc/inline_cross/doc-reachability-impl-31948.rs
@@ -0,0 +1,32 @@
+// https://github.com/rust-lang/rust/issues/31948
+#![crate_name="foobar"]
+
+//@ aux-build:rustdoc-nonreachable-impls.rs
+//@ build-aux-docs
+//@ ignore-cross-compile
+
+extern crate rustdoc_nonreachable_impls;
+
+//@ has foobar/struct.Foo.html
+//@ has - '//*[@class="impl"]//h3[@class="code-header"]' 'Bark for'
+//@ has - '//*[@class="impl"]//h3[@class="code-header"]' 'Woof for'
+//@ !has - '//*[@class="impl"]//h3[@class="code-header"]' 'Bar for'
+//@ !has - '//*[@class="impl"]//h3[@class="code-header"]' 'Qux for'
+pub use rustdoc_nonreachable_impls::Foo;
+
+//@ has foobar/trait.Bark.html
+//@ has - '//h3[@class="code-header"]' 'for Foo'
+//@ !has - '//h3[@class="code-header"]' 'for Wibble'
+//@ !has - '//h3[@class="code-header"]' 'for Wobble'
+pub use rustdoc_nonreachable_impls::Bark;
+
+//@ has foobar/trait.Woof.html
+//@ has - '//h3[@class="code-header"]' 'for Foo'
+//@ !has - '//h3[@class="code-header"]' 'for Wibble'
+//@ !has - '//h3[@class="code-header"]' 'for Wobble'
+pub use rustdoc_nonreachable_impls::Woof;
+
+//@ !has foobar/trait.Bar.html
+//@ !has foobar/trait.Qux.html
+//@ !has foobar/struct.Wibble.html
+//@ !has foobar/struct.Wobble.html