about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-06-10 15:49:43 +0000
committerbors <bors@rust-lang.org>2023-06-10 15:49:43 +0000
commitef8ee73fc4ff70a426e71f900441f040db252dae (patch)
treea08e863beffc8590c28675d4feb73a80ba6d1c58 /tests
parent788c98df5995c9fe360ba9ba5efb103ee69d05c4 (diff)
parent68e162d3643516240b6b1fd2e6ba27e4fd8c091a (diff)
Auto merge of #112494 - matthiaskrgr:rollup-xdf3om8, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #112297 (bootstrap: Disallow `--exclude test::std`)
 - #112298 (Update field-offset and enable unstable_offset_of)
 - #112335 (ci: Upgrade loongarch64-linux-gnu GCC to 13.1.0)
 - #112413 (Adjust span labels for `HIDDEN_GLOB_REEXPORTS`)
 - #112483 (Add deprecation warning to python versions <3.6 in x.py)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/resolve/hidden_glob_reexports.rs4
-rw-r--r--tests/ui/resolve/hidden_glob_reexports.stderr45
2 files changed, 36 insertions, 13 deletions
diff --git a/tests/ui/resolve/hidden_glob_reexports.rs b/tests/ui/resolve/hidden_glob_reexports.rs
index 361243fcd7b..102b5656245 100644
--- a/tests/ui/resolve/hidden_glob_reexports.rs
+++ b/tests/ui/resolve/hidden_glob_reexports.rs
@@ -6,10 +6,10 @@ pub mod upstream_a {
         pub struct Bar {}
     }
 
-    pub use self::inner::*;
-
     struct Foo;
     //~^ WARN private item shadows public glob re-export
+
+    pub use self::inner::*;
 }
 
 pub mod upstream_b {
diff --git a/tests/ui/resolve/hidden_glob_reexports.stderr b/tests/ui/resolve/hidden_glob_reexports.stderr
index ddf7bcda827..11fa94d6fee 100644
--- a/tests/ui/resolve/hidden_glob_reexports.stderr
+++ b/tests/ui/resolve/hidden_glob_reexports.stderr
@@ -1,31 +1,54 @@
 warning: private item shadows public glob re-export
-  --> $DIR/hidden_glob_reexports.rs:11:5
+  --> $DIR/hidden_glob_reexports.rs:9:5
    |
-LL |     pub use self::inner::*;
-   |             -------------- the name `Foo` in the type namespace is supposed to be publicly re-exported here
-LL |
 LL |     struct Foo;
-   |     ^^^^^^^^^^^ but the private item here shadows it
+   |     ^^^^^^^^^^^
+   |
+note: the name `Foo` in the type namespace is supposed to be publicly re-exported here
+  --> $DIR/hidden_glob_reexports.rs:12:13
+   |
+LL |     pub use self::inner::*;
+   |             ^^^^^^^^^^^^^^
+note: but the private item here shadows it
+  --> $DIR/hidden_glob_reexports.rs:9:5
    |
+LL |     struct Foo;
+   |     ^^^^^^^^^^^
    = note: `#[warn(hidden_glob_reexports)]` on by default
 
 warning: private item shadows public glob re-export
   --> $DIR/hidden_glob_reexports.rs:27:9
    |
+LL |     use self::other::Foo;
+   |         ^^^^^^^^^^^^^^^^
+   |
+note: the name `Foo` in the type namespace is supposed to be publicly re-exported here
+  --> $DIR/hidden_glob_reexports.rs:25:13
+   |
 LL |     pub use self::inner::*;
-   |             -------------- the name `Foo` in the type namespace is supposed to be publicly re-exported here
-LL |
+   |             ^^^^^^^^^^^^^^
+note: but the private item here shadows it
+  --> $DIR/hidden_glob_reexports.rs:27:9
+   |
 LL |     use self::other::Foo;
-   |         ^^^^^^^^^^^^^^^^ but the private item here shadows it
+   |         ^^^^^^^^^^^^^^^^
 
 warning: private item shadows public glob re-export
   --> $DIR/hidden_glob_reexports.rs:40:9
    |
+LL |     use std::primitive::u8;
+   |         ^^^^^^^^^^^^^^^^^^
+   |
+note: the name `u8` in the type namespace is supposed to be publicly re-exported here
+  --> $DIR/hidden_glob_reexports.rs:38:13
+   |
 LL |     pub use self::no_def_id::*;
-   |             ------------------ the name `u8` in the type namespace is supposed to be publicly re-exported here
-LL |
+   |             ^^^^^^^^^^^^^^^^^^
+note: but the private item here shadows it
+  --> $DIR/hidden_glob_reexports.rs:40:9
+   |
 LL |     use std::primitive::u8;
-   |         ^^^^^^^^^^^^^^^^^^ but the private item here shadows it
+   |         ^^^^^^^^^^^^^^^^^^
 
 warning: 3 warnings emitted