mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-04 11:17:04 +00:00

Do not eagerly fold consts in `normalize_param_env_or_error` if new solver Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/213 Given: ``` trait Trait: Deref<Target = [u8; { 1 + 1 }]> {} ``` when elaborating param env for `Trait`, we have `Self: Trait`, `Self: Deref<Target = [u8; {anon const}]>`. Before this PR, we would fold the anon consts away *before* elaborating. However, we end up getting another *un-folded* copy of the anon const from elaborating `Self: Trait`. This leads to normalization ambiguity. r? lcnr