rust/tests/ui/parser/macro/pub-item-macro.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
1.0 KiB
Plaintext
Raw Normal View History

2018-10-20 20:36:17 +00:00
error: can't qualify macro invocation with `pub`
--> $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!();
| ^^^ 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
= 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
error[E0603]: static `x` is private
--> $DIR/pub-item-macro.rs:20:23
|
2019-03-09 12:03:44 +00:00
LL | let y: u32 = foo::x;
| ^ private static
|
note: the static `x` is defined here
--> $DIR/pub-item-macro.rs:5:9
|
LL | static x: u32 = 0;
| ^^^^^^^^^^^^^^^^^^
...
LL | pub_x!();
2021-10-14 18:28:28 +00:00
| -------- in this macro invocation
= 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)
error: aborting due to 2 previous errors
2018-10-20 20:36:17 +00:00
For more information about this error, try `rustc --explain E0603`.