2018-09-06 14:41:12 +02:00
|
|
|
//@ run-pass
|
2021-05-13 10:42:25 -04:00
|
|
|
|
2018-09-25 23:51:35 +02:00
|
|
|
#![allow(unused_variables)]
|
2018-09-06 14:41:12 +02:00
|
|
|
|
2016-08-26 19:23:42 +03:00
|
|
|
macro_rules! duplicate {
|
|
|
|
($i: item) => {
|
|
|
|
mod m1 {
|
|
|
|
$i
|
|
|
|
}
|
|
|
|
mod m2 {
|
|
|
|
$i
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
duplicate! {
|
2016-08-22 19:56:14 +03:00
|
|
|
pub union U {
|
2024-02-20 21:20:14 +01:00
|
|
|
#[allow(dead_code)]
|
2016-08-26 19:23:42 +03:00
|
|
|
pub a: u8
|
2016-08-22 19:56:14 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2016-08-26 19:23:42 +03:00
|
|
|
let u1 = m1::U { a: 0 };
|
|
|
|
let u2 = m2::U { a: 0 };
|
2016-08-22 19:56:14 +03:00
|
|
|
}
|