Skip to content

Commit 949b1a8

Browse files
committed
Return Err in homogeneous_aggregate rather than lie about the Size.
1 parent 7b7b4a4 commit 949b1a8

File tree

1 file changed

+2
-4
lines changed
  • compiler/rustc_target/src/abi/call

1 file changed

+2
-4
lines changed

compiler/rustc_target/src/abi/call/mod.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -437,10 +437,8 @@ impl<'a, Ty> TyAndLayout<'a, Ty> {
437437
}))
438438
}
439439

440-
Abi::ScalableVector { .. } => Ok(HomogeneousAggregate::Homogeneous(Reg {
441-
kind: RegKind::ScalableVector,
442-
size: Size::from_bits(128),
443-
})),
440+
// Scalable vectors shouldn't exist within a struct.
441+
Abi::ScalableVector { .. } => Err(Heterogeneous),
444442

445443
Abi::ScalarPair(..) | Abi::Aggregate { sized: true } => {
446444
// Helper for computing `homogeneous_aggregate`, allowing a custom

0 commit comments

Comments
 (0)