Files
rust/tests/ui/const-generics/generic_const_exprs
Jonathan Brouwer ac24945706 Rollup merge of #158738 - Dnreikronos:next_trait_solver/gce_expr_recovery, r=BoxyUwU
next_trait_solver: Recover from GCE const exprs

fixes rust-lang/rust#158428

the next solver already rejects `generic_const_exprs` with `-Znext-solver=globally`, but we can still walk into `ConstKind::Expr` while compiling after that error and crash anyway.

imo this should stay as a recovery fix, not a gce implementation. ambiguity still lgtm to me here: idk that we want to say the expr is solved when the feature combo is already invalid, we just need to not ice after the real error.

long-term, proper `ConstKind::Expr` support would be a much bigger thing. the next solver would need to type-check, normalize, compare, and evaluate or prove these exprs structurally, including nested binops, unops, casts, calls, and the result type for `ConstArgHasType`. that's out of scope for this pr.

this teaches both const evaluatable and const arg has type paths to recover on `ConstKind::Expr`, then adds the union repro as a ui test.
2026-07-22 18:02:22 +02:00
..
2025-06-11 15:30:15 +01:00
2025-05-21 20:20:19 +01:00
2025-05-21 20:20:19 +01:00
2025-05-21 20:20:19 +01:00
2025-05-21 20:20:19 +01:00
2025-02-14 00:37:23 +01:00
2025-02-14 00:37:23 +01:00
2026-03-28 16:18:11 +09:00
2026-03-28 16:18:11 +09:00
2025-06-11 15:30:15 +01:00
2025-05-21 20:20:19 +01:00
…