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