Unnamed repository; edit this file 'description' to name the repository.
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.
Stuart Cook 2 months ago
parent 30c4baa · parent 7e7aa26 · commit 120d823
0 files changed, 0 insertions, 0 deletions