about summary refs log tree commit diff
path: root/tests/rustdoc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-01-18 03:54:04 +0000
committerbors <bors@rust-lang.org>2023-01-18 03:54:04 +0000
commitaaa9bb9e7bb4b8b565f2e1570587d6c21b13ab2d (patch)
tree0d0ac7b2945e57841dd30450fe5caa38ef67aa5f /tests/rustdoc
parente08b379d5d5840a2976d73d1754e8821a9973b66 (diff)
parent3b0d306b94f78f375931f624f53114c205aef066 (diff)
downloadrust-aaa9bb9e7bb4b8b565f2e1570587d6c21b13ab2d.tar.gz
rust-aaa9bb9e7bb4b8b565f2e1570587d6c21b13ab2d.zip
Auto merge of #106952 - petrochenkov:docglob, r=notriddle,GuillaumeGomez
rustdoc: Fix glob import inlining

Filter away names that are not actually imported by the glob, e.g. because they are shadowed by something else.

Fixes the issue found in https://github.com/rust-lang/rust/pull/94857#issuecomment-1382912356.
Diffstat (limited to 'tests/rustdoc')
-rw-r--r--tests/rustdoc/inline_cross/auxiliary/cross-glob.rs2
-rw-r--r--tests/rustdoc/inline_cross/cross-glob.rs5
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/rustdoc/inline_cross/auxiliary/cross-glob.rs b/tests/rustdoc/inline_cross/auxiliary/cross-glob.rs
index cde7f68ff01..48672590a12 100644
--- a/tests/rustdoc/inline_cross/auxiliary/cross-glob.rs
+++ b/tests/rustdoc/inline_cross/auxiliary/cross-glob.rs
@@ -3,3 +3,5 @@
 pub struct SomeStruct;
 
 pub fn some_fn() {}
+
+pub enum Shadowed {}
diff --git a/tests/rustdoc/inline_cross/cross-glob.rs b/tests/rustdoc/inline_cross/cross-glob.rs
index f97da11a901..7a519d2d255 100644
--- a/tests/rustdoc/inline_cross/cross-glob.rs
+++ b/tests/rustdoc/inline_cross/cross-glob.rs
@@ -6,6 +6,11 @@ extern crate inner;
 
 // @has cross_glob/struct.SomeStruct.html
 // @has cross_glob/fn.some_fn.html
+// @!has cross_glob/enum.Shadowed.html
 // @!has cross_glob/index.html '//code' 'pub use inner::*;'
 #[doc(inline)]
 pub use inner::*;
+
+// This type shadows the glob-imported enum `Shadowed`.
+// @has cross_glob/type.Shadowed.html
+pub type Shadowed = u8;