]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/macro/pub-item-macro.rs
Rollup merge of #91055 - lcnr:type_of-closures, r=nikomatsakis
[rust.git] / src / test / ui / parser / macro / pub-item-macro.rs
1 // Issue #14660
2
3 macro_rules! priv_x {
4     () => {
5         static x: u32 = 0;
6     };
7 }
8
9 macro_rules! pub_x { () => {
10     pub priv_x!(); //~ ERROR can't qualify macro invocation with `pub`
11     //~^ HELP remove the visibility
12     //~| HELP try adjusting the macro to put `pub` inside the invocation
13 }}
14
15 mod foo {
16     pub_x!();
17 }
18
19 fn main() {
20     let y: u32 = foo::x; //~ ERROR static `x` is private
21 }