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

32 lines
982 B
Text
Raw Normal View History

2018-10-20 23:36:17 +03:00
error: can't qualify macro invocation with `pub`
--> $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!();
| ^^^ help: remove the visibility
2018-10-20 23:36:17 +03:00
...
LL | pub_x!();
| --------- in this macro invocation
|
= help: try adjusting the macro to put `pub` inside the invocation
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
2018-10-20 23:36:17 +03:00
error[E0603]: static `x` is private
--> $DIR/pub-item-macro.rs:20:23
|
2019-03-09 15:03:44 +03: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!();
| --------- in this macro invocation
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 2 previous errors
2018-10-20 23:36:17 +03:00
For more information about this error, try `rustc --explain E0603`.