mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
19 lines
225 B
Rust
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
|
|
);
|
|
}
|