rust/tests/ui/hygiene/privacy.rs

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

19 lines
225 B
Rust
Raw Normal View History

#![feature(decl_macro)]
2017-03-25 02:37:55 +00:00
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
);
}