2017-01-14 22:49:29 +00:00
|
|
|
#![allow(dead_code)]
|
|
|
|
|
|
|
|
#[repr(align(16))]
|
2022-06-30 02:33:18 +00:00
|
|
|
#[derive(Clone, Copy)]
|
2017-07-23 21:54:48 +00:00
|
|
|
struct SA(i32);
|
2017-01-14 22:49:29 +00:00
|
|
|
|
2022-06-30 02:33:18 +00:00
|
|
|
#[derive(Clone, Copy)]
|
2017-07-23 21:54:48 +00:00
|
|
|
struct SB(SA);
|
|
|
|
|
|
|
|
#[repr(align(16))]
|
2022-06-30 02:33:18 +00:00
|
|
|
#[derive(Clone, Copy)]
|
2017-07-23 21:54:48 +00:00
|
|
|
union UA {
|
|
|
|
i: i32
|
|
|
|
}
|
|
|
|
|
2022-06-30 02:33:18 +00:00
|
|
|
#[derive(Clone, Copy)]
|
2017-07-23 21:54:48 +00:00
|
|
|
union UB {
|
|
|
|
a: UA
|
|
|
|
}
|
|
|
|
|
|
|
|
#[repr(packed)]
|
2020-01-07 00:00:16 +00:00
|
|
|
struct SC(SA); //~ ERROR: packed type cannot transitively contain a `#[repr(align)]` type
|
2017-07-23 21:54:48 +00:00
|
|
|
|
|
|
|
#[repr(packed)]
|
2020-01-07 00:00:16 +00:00
|
|
|
struct SD(SB); //~ ERROR: packed type cannot transitively contain a `#[repr(align)]` type
|
2017-07-23 21:54:48 +00:00
|
|
|
|
|
|
|
#[repr(packed)]
|
2020-01-07 00:00:16 +00:00
|
|
|
struct SE(UA); //~ ERROR: packed type cannot transitively contain a `#[repr(align)]` type
|
2017-07-23 21:54:48 +00:00
|
|
|
|
|
|
|
#[repr(packed)]
|
2020-01-07 00:00:16 +00:00
|
|
|
struct SF(UB); //~ ERROR: packed type cannot transitively contain a `#[repr(align)]` type
|
2017-07-23 21:54:48 +00:00
|
|
|
|
|
|
|
#[repr(packed)]
|
2020-01-07 00:00:16 +00:00
|
|
|
union UC { //~ ERROR: packed type cannot transitively contain a `#[repr(align)]` type
|
2017-07-23 21:54:48 +00:00
|
|
|
a: UA
|
|
|
|
}
|
|
|
|
|
|
|
|
#[repr(packed)]
|
2020-01-07 00:00:16 +00:00
|
|
|
union UD { //~ ERROR: packed type cannot transitively contain a `#[repr(align)]` type
|
2017-07-23 21:54:48 +00:00
|
|
|
n: UB
|
|
|
|
}
|
2017-01-14 22:49:29 +00:00
|
|
|
|
|
|
|
#[repr(packed)]
|
2020-01-07 00:00:16 +00:00
|
|
|
union UE { //~ ERROR: packed type cannot transitively contain a `#[repr(align)]` type
|
2017-07-23 21:54:48 +00:00
|
|
|
a: SA
|
|
|
|
}
|
2017-01-14 22:49:29 +00:00
|
|
|
|
|
|
|
#[repr(packed)]
|
2020-01-07 00:00:16 +00:00
|
|
|
union UF { //~ ERROR: packed type cannot transitively contain a `#[repr(align)]` type
|
2017-07-23 21:54:48 +00:00
|
|
|
n: SB
|
|
|
|
}
|
2017-01-14 22:49:29 +00:00
|
|
|
|
|
|
|
fn main() {}
|