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