rust/compiler/rustc_trait_selection/src
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
..
error_reporting Rollup merge of #152661 - BartSimpson001:fix-next-solver-from-ice, r=petrochenkov 2026-02-17 13:02:22 +11:00
errors Rename inline_fluent! to msg! 2026-02-14 13:47:52 +01:00
solve -Znext-solver Prevent committing unfulfilled unsized coercion 2026-02-13 00:57:01 +09:00
traits Rollup merge of #151783 - mu001999-contrib:impl/final-method, r=fee1-dead 2026-02-17 13:02:21 +11:00
errors.rs Rename inline_fluent! to msg! 2026-02-14 13:47:52 +01:00
infer.rs rename select_where_possible and select_all_or_error 2025-10-07 23:02:23 +01:00
lib.rs Stabilize assert_matches 2026-02-11 14:13:44 +01:00
opaque_types.rs change non-defining use error message 2025-08-25 14:20:18 +02:00
regions.rs remove outdated context (inner) infctx 2025-09-30 21:56:06 +02:00
solve.rs cleanup proof tree implementation and add cache 2025-08-29 09:35:37 +02:00