diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-5718.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-5718.rs b/src/test/ui/issues/issue-5718.rs new file mode 100644 index 000000000..63efec953 --- /dev/null +++ b/src/test/ui/issues/issue-5718.rs @@ -0,0 +1,26 @@ +// 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(); +} |