rust/compiler/rustc_hir/src
Matthias Krüger 2bca5c4fc1
Rollup merge of #130714 - compiler-errors:try-structurally-resolve-const, r=BoxyUwU
Introduce `structurally_normalize_const`, use it in `rustc_hir_typeck`

Introduces `structurally_normalize_const` to typecking to separate the "eval a const" step from the "try to turn a valtree into a target usize" in HIR typeck, where we may still have infer vars and stuff around.

I also changed `check_expr_repeat` to move a double evaluation of a const into a single one. I'll leave inline comments.

r? ```@BoxyUwU```

I hesitated to really test this on the new solver where it probably matters for unevaluated consts. If you're worried about the side-effects, I'd be happy to craft some more tests 😄
2024-09-23 06:45:36 +02:00
..
arena.rs Remove unused arena kinds in rustc_hir and rustc_middle. 2023-11-20 15:05:26 +11:00
def_path_hash_map.rs Do not store stable crate id in on-disk hash map. 2023-12-24 17:22:48 +00:00
def.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
definitions.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
diagnostic_items.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
hir_id.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
hir.rs Rollup merge of #130714 - compiler-errors:try-structurally-resolve-const, r=BoxyUwU 2024-09-23 06:45:36 +02:00
intravisit.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
lang_items.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
lib.rs Add warn(unreachable_pub) to rustc_hir. 2024-08-27 12:59:20 +10:00
pat_util.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
stable_hash_impls.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
target.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
tests.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
weak_lang_items.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00