about summary refs log tree commit diff
path: root/tests/ui/privacy
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2025-08-19 19:42:08 +0800
committerGitHub <noreply@github.com>2025-08-19 19:42:08 +0800
commit8568070822c4a081bd05d53f03eadb2230bef752 (patch)
treea4265522d705b9ee0eda68d991952418dbc5c8c9 /tests/ui/privacy
parentbdd3bc82c897e7bb7f5e56b78a8db5781924f779 (diff)
parent0c8485f02332f18a41f93ecd1cc3e9611040238b (diff)
downloadrust-8568070822c4a081bd05d53f03eadb2230bef752.tar.gz
rust-8568070822c4a081bd05d53f03eadb2230bef752.zip
Rollup merge of #145166 - makai410:teach-pub-crate, r=lcnr
suggest using `pub(crate)` for E0364

- This introduces `vis_span` into `ImportData` for diagnostic purposes.
Closes: rust-lang/rust#145140
Diffstat (limited to 'tests/ui/privacy')
-rw-r--r--tests/ui/privacy/macro-private-reexport.stderr4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/ui/privacy/macro-private-reexport.stderr b/tests/ui/privacy/macro-private-reexport.stderr
index b8768f3612e..aa02715c202 100644
--- a/tests/ui/privacy/macro-private-reexport.stderr
+++ b/tests/ui/privacy/macro-private-reexport.stderr
@@ -11,6 +11,10 @@ LL | /     macro_rules! bar {
 LL | |         () => {};
 LL | |     }
    | |_____^
+help: in case you want to use the macro within this crate only, reduce the visibility to `pub(crate)`
+   |
+LL |     pub(crate) use bar as _;
+   |        +++++++
 
 error[E0364]: `baz` is private, and cannot be re-exported
   --> $DIR/macro-private-reexport.rs:14:13