mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-28 10:39:45 +00:00
Merge pull request #19416 from ShoyuVanilla/issue-15037
fix: Handle multiple `#[repr(..)]` attrs correctly
This commit is contained in:
commit
2e5e5113df
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