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