mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
20 lines
242 B
Rust
20 lines
242 B
Rust
//@ edition:2015
|
|
#![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
|
|
);
|
|
}
|