mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-02 12:59:12 +00:00
fix: Handle multiple #[repr(..)] attrs correctly
This commit is contained in:
parent
32fa60f3a6
commit
602b4f37b9
3 changed files with 91 additions and 71 deletions
|
|
@ -284,6 +284,18 @@ fn repr_packed() {
|
|||
check_size_and_align("#[repr(Rust, packed(5))] struct Goal(i32);", "", 4, 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn multiple_repr_attrs() {
|
||||
size_and_align!(
|
||||
#[repr(C)]
|
||||
#[repr(packed)]
|
||||
struct Goal {
|
||||
id: i32,
|
||||
u: u8,
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn generic() {
|
||||
size_and_align! {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue