2018-09-06 12:41:12 +00:00
|
|
|
// run-pass
|
2021-05-13 14:42:25 +00:00
|
|
|
// revisions: mirunsafeck thirunsafeck
|
|
|
|
// [thirunsafeck]compile-flags: -Z thir-unsafeck
|
|
|
|
|
2018-09-25 21:51:35 +00:00
|
|
|
#![allow(unused_variables)]
|
2018-09-06 12:41:12 +00:00
|
|
|
|
2016-08-26 16:23:42 +00:00
|
|
|
macro_rules! duplicate {
|
|
|
|
($i: item) => {
|
|
|
|
mod m1 {
|
|
|
|
$i
|
|
|
|
}
|
|
|
|
mod m2 {
|
|
|
|
$i
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
duplicate! {
|
2016-08-22 16:56:14 +00:00
|
|
|
pub union U {
|
2016-08-26 16:23:42 +00:00
|
|
|
pub a: u8
|
2016-08-22 16:56:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2016-08-26 16:23:42 +00:00
|
|
|
let u1 = m1::U { a: 0 };
|
|
|
|
let u2 = m2::U { a: 0 };
|
2016-08-22 16:56:14 +00:00
|
|
|
}
|