rust/tests/ui/macros/macro-path.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
220 B
Rust
Raw Normal View History

// run-pass
#![allow(non_camel_case_types)]
2012-11-19 15:59:59 -06:00
mod m {
pub type t = isize;
2012-11-19 15:59:59 -06:00
}
macro_rules! foo {
($p:path) => ({
fn f() -> $p { 10 }
f()
})
2012-11-19 15:59:59 -06:00
}
pub fn main() {
assert_eq!(foo!(m::t), 10);
2012-11-19 15:59:59 -06:00
}