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