mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Merge commit 'af40101841
' into sync-from-ra
This commit is contained in:
parent
79fa976864
commit
3afeb24198
115 changed files with 3106 additions and 3623 deletions
|
@ -220,6 +220,36 @@ fn recursive() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn repr_packed() {
|
||||
size_and_align! {
|
||||
#[repr(packed)]
|
||||
struct Goal;
|
||||
}
|
||||
size_and_align! {
|
||||
#[repr(packed(2))]
|
||||
struct Goal;
|
||||
}
|
||||
size_and_align! {
|
||||
#[repr(packed(4))]
|
||||
struct Goal;
|
||||
}
|
||||
size_and_align! {
|
||||
#[repr(packed)]
|
||||
struct Goal(i32);
|
||||
}
|
||||
size_and_align! {
|
||||
#[repr(packed(2))]
|
||||
struct Goal(i32);
|
||||
}
|
||||
size_and_align! {
|
||||
#[repr(packed(4))]
|
||||
struct Goal(i32);
|
||||
}
|
||||
|
||||
check_size_and_align("#[repr(packed(5))] struct Goal(i32);", "", 4, 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn generic() {
|
||||
size_and_align! {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue