mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-28 05:53:45 +00:00
Fix panic on unaligned packed attribute
This commit is contained in:
parent
59457091bb
commit
30e17e377c
1 changed files with 1 additions and 1 deletions
|
@ -128,7 +128,7 @@ fn parse_repr_tt(tt: &Subtree) -> Option<ReprOptions> {
|
||||||
} else {
|
} else {
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
let pack = Align::from_bytes(pack).unwrap();
|
let pack = Align::from_bytes(pack).unwrap_or(Align::ONE);
|
||||||
min_pack =
|
min_pack =
|
||||||
Some(if let Some(min_pack) = min_pack { min_pack.min(pack) } else { pack });
|
Some(if let Some(min_pack) = min_pack { min_pack.min(pack) } else { pack });
|
||||||
ReprFlags::empty()
|
ReprFlags::empty()
|
||||||
|
|
Loading…
Reference in a new issue