about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/rustdoc/issue-81141-private-reexport-in-public-api-2.rs13
-rw-r--r--tests/rustdoc/issue-81141-private-reexport-in-public-api.rs10
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/rustdoc/issue-81141-private-reexport-in-public-api-2.rs b/tests/rustdoc/issue-81141-private-reexport-in-public-api-2.rs
new file mode 100644
index 00000000000..4e9d188bbf8
--- /dev/null
+++ b/tests/rustdoc/issue-81141-private-reexport-in-public-api-2.rs
@@ -0,0 +1,13 @@
+// edition:2015
+
+#![crate_name = "foo"]
+
+use external::Public as Private;
+
+pub mod external {
+    pub struct Public;
+
+    // @has 'foo/external/fn.make.html'
+    // @has - '//*[@class="rust item-decl"]/code' 'pub fn make() -> Public'
+    pub fn make() -> ::Private { super::Private }
+}
diff --git a/tests/rustdoc/issue-81141-private-reexport-in-public-api.rs b/tests/rustdoc/issue-81141-private-reexport-in-public-api.rs
index 312146e7957..bd54d02c6ec 100644
--- a/tests/rustdoc/issue-81141-private-reexport-in-public-api.rs
+++ b/tests/rustdoc/issue-81141-private-reexport-in-public-api.rs
@@ -112,3 +112,13 @@ pub fn bar14() -> nested::nested2::Whatever3 {
 pub fn bar15() -> nested::nested2::Whatever4 {
     Whatever
 }
+
+use external::Public as Private;
+
+pub mod external {
+    pub struct Public;
+
+    // @has 'foo/external/fn.make.html'
+    // @has - '//*[@class="rust item-decl"]/code' 'pub fn make() -> Public'
+    pub fn make() -> super::Private { super::Private }
+}