about summary refs log tree commit diff
path: root/tests/rustdoc/private-non-local-fields-2.rs
diff options
context:
space:
mode:
authorUrgau <urgau@numericable.fr>2024-05-09 19:58:10 +0200
committerUrgau <urgau@numericable.fr>2024-05-11 13:11:46 +0200
commite89a2cc8957c1e3f3f8ba7190d7c993a15955999 (patch)
tree5529219d5736ced34352d06480925a9a915ea42e /tests/rustdoc/private-non-local-fields-2.rs
parentcb93c24bf36b3367714516fc2308cf6856916eeb (diff)
downloadrust-e89a2cc8957c1e3f3f8ba7190d7c993a15955999.tar.gz
rust-e89a2cc8957c1e3f3f8ba7190d7c993a15955999.zip
Always hide private fields in aliased type
Diffstat (limited to 'tests/rustdoc/private-non-local-fields-2.rs')
-rw-r--r--tests/rustdoc/private-non-local-fields-2.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/rustdoc/private-non-local-fields-2.rs b/tests/rustdoc/private-non-local-fields-2.rs
new file mode 100644
index 00000000000..615b957f697
--- /dev/null
+++ b/tests/rustdoc/private-non-local-fields-2.rs
@@ -0,0 +1,11 @@
+//! This test makes sure that with never show the inner fields in the
+//! aliased type view of type alias.
+
+//@ compile-flags: -Z unstable-options --document-private-items
+
+#![crate_name = "foo"]
+
+use std::collections::BTreeMap;
+
+// @has 'foo/type.FooBar.html' '//*[@class="rust item-decl"]/code' 'struct FooBar { /* private fields */ }'
+pub type FooBar = BTreeMap<u32, String>;