rust/src/test/ui/issues/issue-5718.rs
2019-07-27 18:56:16 +03:00

27 lines
412 B
Rust

// run-pass
// pretty-expanded FIXME #23616
#![feature(box_syntax)]
struct Element;
macro_rules! foo {
($tag: expr, $string: expr) => {
if $tag == $string {
let element: Box<_> = box Element;
unsafe {
return std::mem::transmute::<_, usize>(element);
}
}
}
}
fn bar() -> usize {
foo!("a", "b");
0
}
fn main() {
bar();
}