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

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

18 lines
319 B
Rust
Raw Normal View History

2022-06-14 06:46:11 +00:00
//@ edition:2021
2022-06-14 15:42:10 +00: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 15:42:10 +00:00
macro baz() {}
pub use baz as _; //~ ERROR `baz` is private, and cannot be re-exported
}
fn main() {}