diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2024-05-13 21:14:15 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-13 21:14:15 -0400 |
| commit | 18d9c039bb83483c5b1bfec2ebc333d0462c508d (patch) | |
| tree | a32bc454d0439c89eb1c3555d1d59ea19ee0b39f /compiler/rustc_parse/src/errors.rs | |
| parent | 74a78af0e2e90a1cb0d5f509549f5d9dffc614dc (diff) | |
| parent | fb619ec208b898bad1505c97ee79408b2c60926b (diff) | |
| download | rust-18d9c039bb83483c5b1bfec2ebc333d0462c508d.tar.gz rust-18d9c039bb83483c5b1bfec2ebc333d0462c508d.zip | |
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`.
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
