mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
25 lines
360 B
Rust
25 lines
360 B
Rust
// check-pass
|
|
// ignore-pretty pretty-printing is unhygienic
|
|
|
|
#![feature(decl_macro)]
|
|
|
|
mod bar {
|
|
mod baz {
|
|
pub fn f() {}
|
|
}
|
|
|
|
pub macro m($f:ident) {
|
|
baz::f();
|
|
let _: i32 = $f();
|
|
{
|
|
fn $f() -> u32 { 0 }
|
|
let _: u32 = $f();
|
|
}
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
fn f() -> i32 { 0 }
|
|
bar::m!(f);
|
|
}
|