rust/compiler/rustc_trait_selection
Stuart Cook 572b53fdaf
Rollup merge of #152661 - BartSimpson001:fix-next-solver-from-ice, r=petrochenkov
Avoid ICE in From/TryFrom diagnostic under -Znext-solver

Fixes rust-lang/rust#152518.

Under `-Znext-solver=globally`, `trait_ref.args` may contain fewer
elements than expected. The diagnostic logic in
`fulfillment_errors.rs` assumed at least two elements and
unconditionally called `type_at(1)`, which could lead to an
index out-of-bounds panic during error reporting.

This change adds a defensive check before accessing the second
argument to avoid the ICE. A UI regression test has been added.
2026-02-17 13:02:22 +11:00
..
src Rollup merge of #152661 - BartSimpson001:fix-next-solver-from-ice, r=petrochenkov 2026-02-17 13:02:22 +11:00
Cargo.toml Convert to inline diagnostics in rustc_trait_selection 2026-02-05 16:58:59 +01:00