2018-09-06 07:41:12 -05:00
|
|
|
// run-pass
|
2021-05-13 09:42:25 -05:00
|
|
|
// revisions: mirunsafeck thirunsafeck
|
|
|
|
// [thirunsafeck]compile-flags: -Z thir-unsafeck
|
|
|
|
|
2018-09-25 16:51:35 -05:00
|
|
|
#![allow(path_statements)]
|
|
|
|
#![allow(dead_code)]
|
2018-09-06 07:41:12 -05:00
|
|
|
|
2016-10-19 15:33:41 -05:00
|
|
|
macro_rules! union {
|
|
|
|
() => (struct S;)
|
|
|
|
}
|
|
|
|
|
|
|
|
union!();
|
|
|
|
|
2016-08-26 11:23:42 -05:00
|
|
|
fn union() {}
|
|
|
|
|
2016-08-18 10:31:47 -05:00
|
|
|
fn main() {
|
2016-08-26 11:23:42 -05:00
|
|
|
union();
|
|
|
|
|
2016-08-18 10:31:47 -05:00
|
|
|
let union = 10;
|
|
|
|
|
|
|
|
union;
|
|
|
|
|
|
|
|
union as u8;
|
|
|
|
|
|
|
|
union U {
|
|
|
|
a: u8,
|
|
|
|
}
|
|
|
|
}
|