rust/tests/ui/hygiene/privacy.rs
2023-01-11 09:32:08 +00:00

19 lines
225 B
Rust

#![feature(decl_macro)]
mod foo {
fn f() {}
pub macro m($e:expr) {
f();
self::f();
::foo::f();
$e
}
}
fn main() {
foo::m!(
foo::f() //~ ERROR `f` is private
);
}