]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-5718.rs
New upstream version 1.49.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-5718.rs
CommitLineData
b7449926 1// run-pass
c34b1796
AL
2// pretty-expanded FIXME #23616
3
1a4d82fc 4#![feature(box_syntax)]
223e47cc 5
1a4d82fc 6struct Element;
970d7e83 7
1a4d82fc
JJ
8macro_rules! foo {
9 ($tag: expr, $string: expr) => {
10 if $tag == $string {
c34b1796 11 let element: Box<_> = box Element;
1a4d82fc 12 unsafe {
c34b1796 13 return std::mem::transmute::<_, usize>(element);
1a4d82fc
JJ
14 }
15 }
16 }
17}
18
c34b1796 19fn bar() -> usize {
1a4d82fc
JJ
20 foo!("a", "b");
21 0
223e47cc
LB
22}
23
24fn main() {
1a4d82fc 25 bar();
223e47cc 26}