Files
rust/compiler
Jonathan Brouwer cbab2f0237 Rollup merge of #151495 - enthropy7:fix-simd-zero-length-extern-static, r=JonathanBrouwer
Fix ICE when using zero-length SIMD type in extern static

before my fix using a zero-length SIMD type in an extern static would cause an internal compiler error. now it properly shows a diagnostic error instead of panicking. it was because `LayoutError::InvalidSimd` wasn't handled in `check_static_inhabited` and fell through to a generic `delayed_bug`.

i added handling for `InvalidSimd` in `check_static_inhabited` (similar to `SizeOverflow`): when a SIMD type has an invalid layout, we call `emit_err` with `Spanned` to emit a normal error instead of an ICE. compiler now emits a clear error `"the SIMD type Simd<u8, 0> has zero elements"` with the correct span on the type, matching expected compiler behavior.

fixes rust-lang/rust#151451
2026-01-22 20:42:11 +01:00
..
2026-01-21 20:03:56 -05:00
2026-01-12 08:07:23 +01:00
2026-01-21 20:03:56 -05:00
2026-01-21 20:03:56 -05:00
2026-01-21 20:03:56 -05:00
2026-01-21 20:03:56 -05:00
2026-01-21 12:14:51 +00:00
2026-01-19 16:08:54 +00:00