mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +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
|
|
);
|
|
}
|