summaryrefslogtreecommitdiff
path: root/tests/rustdoc-json/impls/impl_item_visibility_show_hidden.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc-json/impls/impl_item_visibility_show_hidden.rs')
-rw-r--r--tests/rustdoc-json/impls/impl_item_visibility_show_hidden.rs28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/rustdoc-json/impls/impl_item_visibility_show_hidden.rs b/tests/rustdoc-json/impls/impl_item_visibility_show_hidden.rs
new file mode 100644
index 00000000000..3c6fefc4ca2
--- /dev/null
+++ b/tests/rustdoc-json/impls/impl_item_visibility_show_hidden.rs
@@ -0,0 +1,28 @@
+// compile-flags: --document-hidden-items
+#![feature(no_core)]
+#![no_core]
+
+pub struct Foo;
+
+/// impl Foo priv
+impl Foo {
+ fn baz() {}
+}
+// FIXME(#111564): Is this the right behaviour?
+// @is '$.index[*][?(@.docs=="impl Foo priv")].visibility' '"default"'
+
+
+/// impl Foo pub
+impl Foo {
+ pub fn qux() {}
+}
+// @is '$.index[*][?(@.docs=="impl Foo pub")].visibility' '"default"'
+
+
+/// impl Foo hidden
+impl Foo {
+ #[doc(hidden)]
+ pub fn __quazl(){}
+}
+// FIXME(#111564): Is this the right behaviour?
+// @is '$.index[*][?(@.docs=="impl Foo hidden")].visibility' '"default"'