add FCW to warn about wasm ABI transition
This commit is contained in:
parent
be73c1f461
commit
c961d123d2
8 changed files with 259 additions and 13 deletions
|
@ -10,6 +10,9 @@ where
|
|||
if val.layout.is_aggregate() {
|
||||
if let Some(unit) = val.layout.homogeneous_aggregate(cx).ok().and_then(|ha| ha.unit()) {
|
||||
let size = val.layout.size;
|
||||
// This size check also catches over-aligned scalars as `size` will be rounded up to a
|
||||
// multiple of the alignment, and the default alignment of all scalar types on wasm
|
||||
// equals their size.
|
||||
if unit.size == size {
|
||||
val.cast_to(unit);
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue