rust/tests/ui/issues/issue-5718.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
395 B
Rust
Raw Normal View History

//@ run-pass
//@ pretty-expanded FIXME #23616
2014-10-02 19:52:06 +00:00
struct Element;
macro_rules! foo {
($tag: expr, $string: expr) => {
if $tag == $string {
let element: Box<_> = Box::new(Element);
2014-10-02 19:52:06 +00:00
unsafe {
return std::mem::transmute::<_, usize>(element);
2014-10-02 19:52:06 +00:00
}
}
}
}
fn bar() -> usize {
2014-10-02 19:52:06 +00:00
foo!("a", "b");
0
}
fn main() {
bar();
}