diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-04-27 20:46:08 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-27 20:46:08 +0200 |
| commit | aeb4c0413c48350ec8b3b16c31ae8845abd5f350 (patch) | |
| tree | 0303fc693ed78c45c16edc5b8745d3487b9e45d7 /tests/codegen/patchable-function-entry | |
| parent | 52ce43e9ac31efda1450a10470a4245284cba83e (diff) | |
| parent | c62bc31b16f2e80e976dbd193dc785c466c2c55f (diff) | |
| download | rust-aeb4c0413c48350ec8b3b16c31ae8845abd5f350.tar.gz rust-aeb4c0413c48350ec8b3b16c31ae8845abd5f350.zip | |
Rollup merge of #124394 - gurry:123863-ice-unexpected-region, r=lcnr
Fix ICE on invalid const param types Fixes ICE #123863 which occurs because the const param has a type which is not a `bool`, `char` or an integral type. The ICEing code path begins here in `typeck_with_fallback`: https://github.com/rust-lang/rust/blob/cb3752d20e0f5d24348062211102a08d46fbecff/compiler/rustc_hir_typeck/src/lib.rs#L167 The `fallback` invokes the `type_of` query and that eventually ends up calling `ct_infer` from the lowering code over here: https://github.com/rust-lang/rust/blob/cb3752d20e0f5d24348062211102a08d46fbecff/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs#L561 and `ct_infer` ICEs at this location: https://github.com/rust-lang/rust/blob/cb3752d20e0f5d24348062211102a08d46fbecff/compiler/rustc_hir_analysis/src/collect.rs#L392 To fix the ICE it I'm triggering a `span_delayed_bug` before we hit `ct_infer` if the type of the const param is not one of the supported types ### Edit On `@lcnr's` suggestion I've changed the approach to not let `ReStatic` region hit the `bug!` in `ct_infer` instead of triggering a `span_delayed_bug`.
Diffstat (limited to 'tests/codegen/patchable-function-entry')
0 files changed, 0 insertions, 0 deletions
