rust/src/test/run-pass/macro-path.rs

17 lines
203 B
Rust
Raw Normal View History

2012-11-19 15:59:59 -06:00
mod m {
pub type t = int;
}
fn macros() {
macro_rules! foo {
($p:path) => {
fn f() -> $p { 10 }
f()
}
}
}
fn main() {
assert foo!(m::t) == 10;
}