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