rust/compiler/rustc_trait_selection/src/traits
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
..
query Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
select Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
specialize Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
auto_trait.rs Remove #[macro_use] extern crate tracing from rustc_trait_selection. 2024-08-30 17:14:59 +10:00
coherence.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
const_evaluatable.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
engine.rs Revert 'Stabilize -Znext-solver=coherence' 2024-09-11 17:57:04 -04:00
fulfill.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
misc.rs Use assert_matches around the compiler 2024-08-11 12:25:39 -04:00
mod.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
normalize.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
object_safety.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
outlives_bounds.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
project.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
structural_normalize.rs Introduce structurally_normalize_const, use it in hir_typeck 2024-09-22 13:54:16 -04:00
util.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
vtable.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
wf.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00