mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-14 01:25:54 +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
|
|
);
|
|
}
|