2018-08-30 14:18:55 +02:00
|
|
|
// run-pass
|
2015-03-22 13:13:15 -07:00
|
|
|
// pretty-expanded FIXME #23616
|
|
|
|
|
2015-01-08 02:25:56 +01:00
|
|
|
#![feature(box_syntax)]
|
|
|
|
|
2014-10-02 21:52:06 +02:00
|
|
|
struct Element;
|
|
|
|
|
|
|
|
macro_rules! foo {
|
|
|
|
($tag: expr, $string: expr) => {
|
|
|
|
if $tag == $string {
|
2015-02-17 21:41:32 +01:00
|
|
|
let element: Box<_> = box Element;
|
2014-10-02 21:52:06 +02:00
|
|
|
unsafe {
|
2015-03-25 17:06:52 -07:00
|
|
|
return std::mem::transmute::<_, usize>(element);
|
2014-10-02 21:52:06 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-03-25 17:06:52 -07:00
|
|
|
fn bar() -> usize {
|
2014-10-02 21:52:06 +02:00
|
|
|
foo!("a", "b");
|
|
|
|
0
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
bar();
|
|
|
|
}
|