rust/tests/ui/traits/next-solver
Jubilee 25c55c51cb
Rollup merge of #126142 - compiler-errors:trait-ref-split, r=jackh726
Harmonize using root or leaf obligation in trait error reporting

When #121826 changed the error reporting to use root obligation and not the leafmost obligation, it didn't actually make sure that all the other diagnostics helper functions used the right obligation.

Specifically, when reporting similar impl candidates we are looking for impls of the root obligation, but trying to match them against the trait ref of the leaf obligation.

This does a few other miscellaneous changes. There's a lot more clean-up that could be done here, but working with this code is really grief-inducing due to how messy it has become over the years. Someone really needs to show it love. 😓

r? ``@estebank``

Fixes #126129
2024-06-12 20:03:19 -07:00
..
alias-relate [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
assembly Add some new solver tests 2024-03-08 15:54:04 +00:00
canonical better error message for normalizes-to ambiguities 2024-06-12 19:03:37 -04:00
coherence Don't ICE because recomputing overflow goals during find_best_leaf_obligation causes inference side-effects 2024-05-16 10:00:11 -04:00
cycles eagerly normalize when adding goals 2024-05-28 04:54:05 +00:00
diagnostics Rollup merge of #126142 - compiler-errors:trait-ref-split, r=jackh726 2024-06-12 20:03:19 -07:00
env-shadows-impls Also passthrough for projection clauses 2024-06-12 19:10:02 -04:00
generalize bivariant alias: set has_unconstrained_ty_var 2024-06-05 11:48:03 +02:00
normalize Also passthrough for projection clauses 2024-06-12 19:10:02 -04:00
overflow Don't ICE because recomputing overflow goals during find_best_leaf_obligation causes inference side-effects 2024-05-16 10:00:11 -04:00
typeck Structurally resolve before builtin_index in EUV 2024-05-24 16:20:48 -04:00
alias-bound-preference.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
alias-bound-unsound.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
alias-bound-unsound.stderr distinguish recursion limit based overflow for diagnostics 2024-02-29 10:14:02 +01:00
alias-eq-in-canonical-response.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
alias-sub.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
ambiguous-impl-in-resolve.rs Don't ICE when codegen_select returns ambiguity in new solver 2024-04-25 11:49:12 -04:00
array-default.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
async.fail.stderr consistently use "next solver" instead of "new solver" 2023-12-14 15:22:37 +01:00
async.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
auto-with-drop_tracking_mir.fail.stderr Harmonize use of leaf and root obligation in trait error reporting 2024-06-12 20:57:23 -04:00
auto-with-drop_tracking_mir.rs Use a proof tree visitor to refine the Obligation for error reporting 2024-05-02 21:56:14 -04:00
borrowck-error.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
borrowck-error.stderr consistently use "next solver" instead of "new solver" 2023-12-14 15:22:37 +01:00
builtin-fn-must-return-sized.rs Use a proof tree visitor to refine the Obligation for error reporting 2024-05-02 21:56:14 -04:00
builtin-fn-must-return-sized.stderr Use a proof tree visitor to refine the Obligation for error reporting 2024-05-02 21:56:14 -04:00
cast-checks-handling-projections.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
closure-inference-guidance.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
closure-signature-inference-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
closure-signature-inference.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
closure-substs-ambiguity.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
coerce-ambig-alias-to-rigid-alias.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
const-param-placeholder.fail.stderr consistently use "next solver" instead of "new solver" 2023-12-14 15:22:37 +01:00
const-param-placeholder.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
constrain-alias-goals-in-unsize.rs Process alias-relate obligations in CoerceUnsized loop 2024-02-27 20:07:58 +00:00
coroutine.fail.stderr Error on using yield without also using #[coroutine] on the closure 2024-04-24 08:05:29 +00:00
coroutine.rs Error on using yield without also using #[coroutine] on the closure 2024-04-24 08:05:29 +00:00
deduce-ty-from-object.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
dedup-regions.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
destruct.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
dont-canonicalize-re-error.rs Uniquify ReError on input mode in canonicalizer 2024-03-22 16:35:50 -04:00
dont-canonicalize-re-error.stderr Uniquify ReError on input mode in canonicalizer 2024-03-22 16:35:50 -04:00
dont-coerce-infer-to-dyn.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
dont-elaborate-for-projections.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
dont-ice-on-assoc-projection.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
dont-ice-on-assoc-projection.stderr Bless tests 2024-01-13 12:46:58 -05:00
dont-loop-fulfill-on-region-constraints.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
dont-normalize-proj-with-error.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
dont-normalize-proj-with-error.stderr consistently use "next solver" instead of "new solver" 2023-12-14 15:22:37 +01:00
dont-remap-tait-substs.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
dont-type_of-tait-in-defining-scope.is_send.stderr use alias-relate to structurally normalize in the solver 2024-02-13 05:08:51 +01:00
dont-type_of-tait-in-defining-scope.not_send.stderr use alias-relate to structurally normalize in the solver 2024-02-13 05:08:51 +01:00
dont-type_of-tait-in-defining-scope.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
dyn-any-dont-prefer-impl.rs change selection test to run-pass 2024-05-28 04:44:45 +00:00
elaborate-item-bounds.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
escaping-bound-vars-in-writeback-normalization.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
float-canonical.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
fn-trait-closure.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
fn-trait.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
fn-trait.stderr Use parenthetical notation for Fn traits 2024-05-29 22:26:54 +00:00
higher-ranked-dyn-bounds.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
int-var-alias-eq.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
int-var-is-send.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-118950-root-region.rs Report better WF obligation leaf obligations in new solver 2024-05-16 21:08:42 -04:00
issue-118950-root-region.stderr Remove DebugWithInfcx 2024-06-11 22:13:04 -04:00
iter-filter-projection.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
lazy-nested-obligations-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
lazy-nested-obligations-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
lazy-nested-obligations-3.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
more-object-bound.rs Use a proof tree visitor to refine the Obligation for error reporting 2024-05-02 21:56:14 -04:00
more-object-bound.stderr Use a proof tree visitor to refine the Obligation for error reporting 2024-05-02 21:56:14 -04:00
nested-alias-bound.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
nested-obligations-with-bound-vars-gat.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
object-soundness-requires-generalization.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
object-unsafety.rs Report better WF obligation leaf obligations in new solver 2024-05-16 21:08:42 -04:00
object-unsafety.stderr Report better WF obligation leaf obligations in new solver 2024-05-16 21:08:42 -04:00
opportunistic-region-resolve.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
param-discr-kind.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
pointee.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
pointer-like.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
pointer-like.stderr consistently use "next solver" instead of "new solver" 2023-12-14 15:22:37 +01:00
prefer-candidate-no-constraints.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
prefer-param-env-on-ambiguity.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
projection-discr-kind.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
projection-discr-kind.stderr consistently use "next solver" instead of "new solver" 2023-12-14 15:22:37 +01:00
select-alias-bound-as-param.rs Use correct ImplSource for alias bounds 2024-05-06 14:38:35 -04:00
slice-match-byte-lit.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
specialization-transmute.rs Fold item bound before checking that they hold 2024-05-30 15:52:29 -04:00
specialization-transmute.stderr Also passthrough for projection clauses 2024-06-12 19:10:02 -04:00
specialization-unconstrained.rs Also passthrough for projection clauses 2024-06-12 19:10:02 -04:00
specialization-unconstrained.stderr Also passthrough for projection clauses 2024-06-12 19:10:02 -04:00
stall-num-var-auto-trait.fallback.stderr consistently use "next solver" instead of "new solver" 2023-12-14 15:22:37 +01:00
stall-num-var-auto-trait.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
structural-resolve-field.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
trait-upcast-lhs-needs-normalization.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
try-example.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unevaluated-const-impl-trait-ref.fails.stderr consistently use "next solver" instead of "new solver" 2023-12-14 15:22:37 +01:00
unevaluated-const-impl-trait-ref.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unsafe-auto-trait-impl.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unsize-although-ambiguous.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unsize-good.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unsound-region-obligation.rs Fold item bound before checking that they hold 2024-05-30 15:52:29 -04:00
unsound-region-obligation.stderr Fold item bound before checking that they hold 2024-05-30 15:52:29 -04:00
upcast-right-substs.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
upcast-wrong-substs.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
upcast-wrong-substs.stderr consistently use "next solver" instead of "new solver" 2023-12-14 15:22:37 +01:00
winnow-specializing-impls.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00