2018-08-30 14:18:55 +02:00
|
|
|
// run-pass
|
2018-08-31 15:02:01 +02:00
|
|
|
#![allow(non_camel_case_types)]
|
|
|
|
|
2015-03-22 13:13:15 -07:00
|
|
|
|
2012-11-19 13:59:59 -08:00
|
|
|
mod m {
|
2015-03-25 17:06:52 -07:00
|
|
|
pub type t = isize;
|
2012-11-19 13:59:59 -08:00
|
|
|
}
|
|
|
|
|
2012-11-21 15:53:49 -05:00
|
|
|
macro_rules! foo {
|
|
|
|
($p:path) => ({
|
2020-11-25 17:00:28 -05:00
|
|
|
fn f() -> $p { 10 }
|
2012-11-21 15:53:49 -05:00
|
|
|
f()
|
|
|
|
})
|
2012-11-19 13:59:59 -08:00
|
|
|
}
|
|
|
|
|
2013-02-01 19:43:17 -08:00
|
|
|
pub fn main() {
|
2013-05-18 22:02:45 -04:00
|
|
|
assert_eq!(foo!(m::t), 10);
|
2012-11-19 13:59:59 -08:00
|
|
|
}
|