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. |
||
|---|---|---|
| .. | ||
| error_reporting | ||
| errors | ||
| solve | ||
| traits | ||
| errors.rs | ||
| infer.rs | ||
| lib.rs | ||
| opaque_types.rs | ||
| regions.rs | ||
| solve.rs | ||