about summary refs log tree commit diff
path: root/src/test/ui/parser
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2020-01-12 16:04:03 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2020-01-16 21:59:11 +0300
commit28c3f6eb409596be9c0c0a59dc1c26e216d9e57a (patch)
treedd96f56468188a07a098129f3c3bdc10d91a05fe /src/test/ui/parser
parent0f70daa9b06882d7fb684a60160e4949d2861136 (diff)
downloadrust-28c3f6eb409596be9c0c0a59dc1c26e216d9e57a.tar.gz
rust-28c3f6eb409596be9c0c0a59dc1c26e216d9e57a.zip
resolve: Point at the private item definitions in privacy errors
Diffstat (limited to 'src/test/ui/parser')
-rw-r--r--src/test/ui/parser/macro/pub-item-macro.stderr11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/test/ui/parser/macro/pub-item-macro.stderr b/src/test/ui/parser/macro/pub-item-macro.stderr
index fa25161ab50..ae981ac4cbe 100644
--- a/src/test/ui/parser/macro/pub-item-macro.stderr
+++ b/src/test/ui/parser/macro/pub-item-macro.stderr
@@ -13,7 +13,16 @@ error[E0603]: static `x` is private
   --> $DIR/pub-item-macro.rs:17:23
    |
 LL |     let y: u32 = foo::x;
-   |                       ^
+   |                       ^ this static is private
+   |
+note: the static `x` is defined here
+  --> $DIR/pub-item-macro.rs:4:5
+   |
+LL |     static x: u32 = 0;
+   |     ^^^^^^^^^^^^^^^^^^
+...
+LL |     pub_x!();
+   |     --------- in this macro invocation
 
 error: aborting due to 2 previous errors