rust/src/test/ui/parser/macro/pub-item-macro.stderr

30 lines
739 B
Plaintext
Raw Normal View History

2018-10-20 15:36:17 -05:00
error: can't qualify macro invocation with `pub`
2018-12-25 09:56:47 -06:00
--> $DIR/pub-item-macro.rs:8:5
2018-10-20 15:36:17 -05:00
|
2019-03-09 06:03:44 -06:00
LL | pub priv_x!();
2018-10-20 15:36:17 -05:00
| ^^^
...
LL | pub_x!();
| --------- in this macro invocation
|
= help: try adjusting the macro to put `pub` inside the invocation
error[E0603]: static `x` is private
2018-12-26 18:07:00 -06:00
--> $DIR/pub-item-macro.rs:17:23
|
2019-03-09 06:03:44 -06:00
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
2018-10-20 15:36:17 -05:00
For more information about this error, try `rustc --explain E0603`.