2021-05-13 14:42:25 +00:00
|
|
|
// revisions: mirunsafeck thirunsafeck
|
|
|
|
// [thirunsafeck]compile-flags: -Z thir-unsafeck
|
|
|
|
|
2016-08-15 13:10:58 +00:00
|
|
|
union U {
|
2018-06-09 23:53:36 +00:00
|
|
|
a: str,
|
2018-07-10 21:10:13 +00:00
|
|
|
//~^ ERROR the size for values of type
|
2023-10-25 10:49:24 +00:00
|
|
|
//~| ERROR field must implement `Copy`
|
2018-06-19 22:53:51 +00:00
|
|
|
|
2016-08-26 16:23:42 +00:00
|
|
|
b: u8,
|
|
|
|
}
|
|
|
|
|
|
|
|
union W {
|
|
|
|
a: u8,
|
2018-06-09 23:53:36 +00:00
|
|
|
b: str,
|
2018-07-10 21:10:13 +00:00
|
|
|
//~^ ERROR the size for values of type
|
2023-10-25 10:49:24 +00:00
|
|
|
//~| ERROR field must implement `Copy`
|
2016-08-15 13:10:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|