diff options
Diffstat (limited to 'src/test/ui/parser')
| -rw-r--r-- | src/test/ui/parser/macro/pub-item-macro.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/parser/macro/pub-item-macro.stderr | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/test/ui/parser/macro/pub-item-macro.rs b/src/test/ui/parser/macro/pub-item-macro.rs index 7bab8653982..bae90227c62 100644 --- a/src/test/ui/parser/macro/pub-item-macro.rs +++ b/src/test/ui/parser/macro/pub-item-macro.rs @@ -14,5 +14,5 @@ mod foo { } fn main() { - let y: u32 = foo::x; + let y: u32 = foo::x; //~ ERROR static `x` is private } diff --git a/src/test/ui/parser/macro/pub-item-macro.stderr b/src/test/ui/parser/macro/pub-item-macro.stderr index a801986ed4e..fb7a1fce549 100644 --- a/src/test/ui/parser/macro/pub-item-macro.stderr +++ b/src/test/ui/parser/macro/pub-item-macro.stderr @@ -9,5 +9,12 @@ LL | pub_x!(); | = help: try adjusting the macro to put `pub` inside the invocation -error: aborting due to previous error +error[E0603]: static `x` is private + --> $DIR/pub-item-macro.rs:27:23 + | +LL | let y: u32 = foo::x; //~ ERROR static `x` is private + | ^ + +error: aborting due to 2 previous errors +For more information about this error, try `rustc --explain E0603`. |
