Files
rust/compiler
Jacob Pratt 18d9c039bb Rollup merge of #124997 - gurry:124848-ice-should-be-sized, r=Nadrieril
Fix ICE while casting a type with error

Fixes #124848

The ICE originates here: https://github.com/rust-lang/rust/blob/f9a3fd966162b3c7386d90fe4626471f66ba3b8f/compiler/rustc_hir_typeck/src/cast.rs#L143 The underlying cause is that a type with error, `MyType` was involved in a cast. During cast checks the below method `pointer_kind` was called: https://github.com/rust-lang/rust/blob/f9a3fd966162b3c7386d90fe4626471f66ba3b8f/compiler/rustc_hir_typeck/src/cast.rs#L87-L91 Thanks to the changes in PR #123491, `type_is_sized_modulo_regions` in `pointer_kind` returned `false` which caused control to reach the `span_bug` here: https://github.com/rust-lang/rust/blob/f9a3fd966162b3c7386d90fe4626471f66ba3b8f/compiler/rustc_hir_typeck/src/cast.rs#L143 resulting in an ICE.

This PR fixes the issue by changing the `span_bug` to a `span_delayed_bug`.
2024-05-13 21:14:15 -04:00
..
2024-05-11 18:18:20 -07:00
2024-04-18 15:36:25 +10:00
2024-05-13 11:59:42 -04:00
2024-05-08 15:06:35 +00:00
2024-05-10 15:44:03 -04:00
2024-05-01 22:19:11 -04:00
2024-05-13 16:55:58 -04:00
2024-05-13 16:55:58 -04:00
2024-05-13 11:59:42 -04:00