fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.0 KiB31 linesraw
1error: can't qualify macro invocation with `pub`
2  --> $DIR/pub-item-macro.rs:10:5
3   |
4LL |     pub priv_x!();
5   |     ^^^ help: remove the visibility
6...
7LL |     pub_x!();
8   |     -------- in this macro invocation
9   |
10   = help: try adjusting the macro to put `pub` inside the invocation
11   = note: this error originates in the macro `pub_x` (in Nightly builds, run with -Z macro-backtrace for more info)
12
13error[E0603]: static `x` is private
14  --> $DIR/pub-item-macro.rs:20:23
15   |
16LL |     let y: u32 = foo::x;
17   |                       ^ private static
18   |
19note: the static `x` is defined here
20  --> $DIR/pub-item-macro.rs:5:9
21   |
22LL |         static x: u32 = 0;
23   |         ^^^^^^^^^^^^^^^^^^
24...
25LL |     pub_x!();
26   |     -------- in this macro invocation
27   = 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)
28
29error: aborting due to 2 previous errors
30
31For more information about this error, try `rustc --explain E0603`.