mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
24 lines
395 B
Rust
24 lines
395 B
Rust
//@ run-pass
|
|
//@ pretty-expanded FIXME #23616
|
|
|
|
struct Element;
|
|
|
|
macro_rules! foo {
|
|
($tag: expr, $string: expr) => {
|
|
if $tag == $string {
|
|
let element: Box<_> = Box::new(Element);
|
|
unsafe {
|
|
return std::mem::transmute::<_, usize>(element);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
fn bar() -> usize {
|
|
foo!("a", "b");
|
|
0
|
|
}
|
|
|
|
fn main() {
|
|
bar();
|
|
}
|