rust/tests/ui/privacy/macro-private-reexport.rs

18 lines
318 B
Rust
Raw Normal View History

2022-06-14 01:46:11 -05:00
// edition:2021
2022-06-14 10:42:10 -05:00
#![feature(decl_macro)]
mod foo {
macro_rules! bar {
() => {};
}
pub use bar as _; //~ ERROR `bar` is only public within the crate, and cannot be re-exported outside
2022-06-14 10:42:10 -05:00
macro baz() {}
pub use baz as _; //~ ERROR `baz` is private, and cannot be re-exported
}
fn main() {}