mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 15:54:15 +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
|
|
);
|
|
}
|