Skip to content

Commit 0324ff4

Browse files
committed
Return Err in homogeneous_aggregate rather than lie about the Size.
1 parent 5869f9d commit 0324ff4

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
@@ -467,10 +467,8 @@ impl<'a, Ty> TyAndLayout<'a, Ty> {
467467
}))
468468
}
469469

470-
Abi::ScalableVector { .. } => Ok(HomogeneousAggregate::Homogeneous(Reg {
471-
kind: RegKind::ScalableVector,
472-
size: Size::from_bits(128),
473-
})),
470+
// Scalable vectors shouldn't exist within a struct.
471+
Abi::ScalableVector { .. } => Err(Heterogeneous),
474472

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

0 commit comments

Comments
 (0)