rust/compiler/rustc_trait_selection/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
..
error_reporting Rollup merge of #130712 - compiler-errors:const-eval-error-reporting, r=BoxyUwU 2024-09-23 06:45:34 +02:00
errors Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
solve Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
traits Rollup merge of #130714 - compiler-errors:try-structurally-resolve-const, r=BoxyUwU 2024-09-23 06:45:36 +02:00
errors.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
infer.rs Remove #[macro_use] extern crate tracing from rustc_trait_selection. 2024-08-30 17:14:59 +10:00
lib.rs Add warn(unreachable_pub) to rustc_trait_selection. 2024-09-03 08:49:54 +10:00
regions.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
solve.rs