2018-10-20 15:36:17 -05:00
error: can't qualify macro invocation with `pub`
2020-01-31 23:18:10 -06:00
--> $DIR/pub-item-macro.rs:10:5
2018-10-20 15:36:17 -05:00
|
2019-03-09 06:03:44 -06:00
LL | pub priv_x!();
2020-01-31 23:18:10 -06:00
| ^^^ help: remove the visibility
2018-10-20 15:36:17 -05:00
...
LL | pub_x!();
2021-10-14 13:28:28 -05:00
| -------- in this macro invocation
2018-10-20 15:36:17 -05:00
|
= help: try adjusting the macro to put `pub` inside the invocation
2021-02-13 13:52:25 -06:00
= note: this error originates in the macro `pub_x` (in Nightly builds, run with -Z macro-backtrace for more info)
2018-10-20 15:36:17 -05:00
2018-12-16 11:23:27 -06:00
error[E0603]: static `x` is private
2020-01-31 23:18:10 -06:00
--> $DIR/pub-item-macro.rs:20:23
2018-12-16 11:23:27 -06:00
|
2019-03-09 06:03:44 -06:00
LL | let y: u32 = foo::x;
2020-03-22 17:36:54 -05:00
| ^ private static
2020-01-12 07:04:03 -06:00
|
note: the static `x` is defined here
2020-01-31 23:18:10 -06:00
--> $DIR/pub-item-macro.rs:5:9
2020-01-12 07:04:03 -06:00
|
2020-01-31 23:18:10 -06:00
LL | static x: u32 = 0;
| ^^^^^^^^^^^^^^^^^^
2020-01-12 07:04:03 -06:00
...
LL | pub_x!();
2021-10-14 13:28:28 -05:00
| -------- in this macro invocation
2022-06-20 21:25:52 -05:00
= note: this error originates in the macro `priv_x` which comes from the expansion of the macro `pub_x` (in Nightly builds, run with -Z macro-backtrace for more info)
2018-12-16 11:23:27 -06:00
error: aborting due to 2 previous errors
2018-10-20 15:36:17 -05:00
2018-12-16 11:23:27 -06:00
For more information about this error, try `rustc --explain E0603`.