rust/tests/ui/traits/next-solver
Matthias Krüger 69b13e4cab
Rollup merge of #141347 - lcnr:lets-make-it-unsound-3, r=compiler-errors
incorrectly prefer builtin `dyn` impls :3

This makes #57893 slightly more exploitable with the new solver. It's still strictly better than the old solver and the underlying unsoundness persists in the new one even without this preference.

Properly fixing #57893 is something we've been looking at more deeply recently and discussed at the [Types Meetup during the All-Hands](https://hackmd.io/rz-4ghMzTb2wXOkdLKHaHw#Dyn-traits). Whatever approach we'll end up deciding on will likely require a fairly long transition period and some significant further design work. This should not block `-Znext-solver`.

fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/183

r? `@compiler-errors` cc `@rust-lang/types`
2025-05-21 22:14:59 +02:00
..
alias-relate Implement `#[define_opaque]` attribute for functions. 2025-03-11 12:05:02 +00:00
assembly fix better_any breakage by making the solver more unsound 2025-05-21 13:54:19 +00:00
canonical Manually walk into WF obligations in BestObligation proof tree visitor 2025-01-31 18:21:58 +00:00
coercion eagerly check nested obligations when coercing fndefs 2025-05-21 11:09:48 +00:00
coherence change definitely non-productive cycles to error 2025-03-05 10:06:43 +01:00
cycles stepping into impls for norm is unproductive 2025-04-16 10:35:09 +02:00
diagnostics UI tests: add missing diagnostic kinds where possible 2025-04-08 23:06:31 +03:00
generalize resolve FIXME 2024-12-18 16:35:06 +01:00
method Use DeepRejectCtxt in assemble_inherent_candidates_from_param 2025-05-21 10:02:54 +00:00
normalization-shadowing handle global trait bounds defining assoc type 2025-01-20 18:51:45 +01:00
normalize Only prefer param-env candidates if they remain non-global after norm 2025-05-07 16:00:21 +00:00
opaques support duplicates in the opaque_types_storage 2025-05-06 14:59:09 +00:00
overflow Deeply normalize obligations in BestObligation 2025-04-10 18:58:04 +00:00
typeck Auto merge of #133559 - compiler-errors:structurally-resolve-adjust-for-branch, r=lcnr 2024-12-06 04:55:35 +00:00
alias-bound-preference.rs
alias-bound-unsound.rs Bless tests due to extra error reporting due to normalizing types that are not WF 2024-11-27 03:34:58 +00:00
alias-bound-unsound.stderr Bless tests due to extra error reporting due to normalizing types that are not WF 2024-11-27 03:34:58 +00:00
alias-eq-in-canonical-response.rs
alias-sub.rs
ambiguous-impl-in-resolve.rs
array-default.rs
async.fail.stderr Deeply normalize obligations in BestObligation 2025-04-10 18:58:04 +00:00
async.rs Deeply normalize obligations in BestObligation 2025-04-10 18:58:04 +00:00
auto-with-drop_tracking_mir.fail.stderr Remove detail from label/note that is already available in other note 2024-10-29 16:26:57 +00:00
auto-with-drop_tracking_mir.rs
borrowck-error.rs
borrowck-error.stderr
builtin-fn-must-return-sized.rs UI tests: add missing diagnostic kinds where possible 2025-04-08 23:06:31 +03:00
builtin-fn-must-return-sized.stderr Remove detail from label/note that is already available in other note 2024-10-29 16:26:57 +00:00
cast-checks-handling-projections.rs
closure-inference-guidance.rs
closure-signature-inference-2.rs
closure-signature-inference-hr-ambig-alias-naming-self.rs "normalize" signature before checking mentions self 2025-01-28 14:11:29 +00:00
closure-signature-inference.rs
closure-substs-ambiguity.rs
const-param-placeholder.fail.stderr
const-param-placeholder.rs
constrain-alias-goals-in-unsize.rs
coroutine.fail.stderr Be better at reporting alias errors 2024-10-15 20:42:17 -04:00
coroutine.rs fix tests 2024-11-02 16:58:50 +00:00
deduce-ty-from-object.rs
dedup-regions.rs
destruct.rs Gate const drop behind const_destruct feature, and fix const_precise_live_drops post-drop-elaboration check 2024-11-22 16:54:40 +00:00
dont-canonicalize-re-error.rs
dont-canonicalize-re-error.stderr
dont-coerce-infer-to-dyn.rs
dont-elaborate-for-projections.rs
dont-ice-on-assoc-projection.rs
dont-ice-on-assoc-projection.stderr
dont-ice-on-bad-transmute-in-typeck.rs Don't ice on bad transmute in typeck in new solver 2025-01-06 17:56:16 +00:00
dont-ice-on-bad-transmute-in-typeck.stderr Deeply normalize in the new solver in WF 2025-05-05 15:52:38 +00:00
dont-loop-fulfill-on-region-constraints.rs
dont-normalize-proj-with-error.rs
dont-normalize-proj-with-error.stderr
dyn-any-dont-prefer-impl.rs
dyn-incompatibility.rs Register a dummy candidate for failed structural normalization during candiate assembly 2024-10-15 20:42:17 -04:00
dyn-incompatibility.stderr Use trait name instead of full constraint in suggestion message 2024-12-07 21:29:58 +00:00
elaborate-item-bounds.rs
escaping-bound-vars-in-writeback-normalization.rs
float-canonical.rs
fn-trait-closure.rs
fn-trait.rs Check that alias-relate terms are WF if reporting an error in alias-relate 2024-06-13 08:52:35 -04:00
fn-trait.stderr Be better at reporting alias errors 2024-10-15 20:42:17 -04:00
gat-wf.rs UI tests: add missing diagnostic kinds where possible 2025-04-08 23:06:31 +03:00
gat-wf.stderr Deeply normalize associated type bounds before proving them 2025-02-17 17:21:24 +00:00
global-cache-and-parallel-frontend.rs compiler: Inform the solver of concurrency 2024-09-09 13:07:48 -07:00
global-cache-and-parallel-frontend.stderr Do not suggest using `-Zmacro-backtrace` for builtin macros 2025-03-14 19:50:03 +00:00
global-param-env-after-norm.rs Only prefer param-env candidates if they remain non-global after norm 2025-05-07 16:00:21 +00:00
higher-ranked-dyn-bounds.rs
int-var-alias-eq.rs
int-var-is-send.rs
issue-118950-root-region.rs Deeply normalize in the new solver in WF 2025-05-05 15:52:38 +00:00
issue-118950-root-region.stderr Deeply normalize in the new solver in WF 2025-05-05 15:52:38 +00:00
iter-filter-projection.rs
known-type-outlives-has-constraints.rs Make sure to scrape region constraints from deeply normalizing type outlives assumptions in borrowck 2025-01-14 19:13:18 +00:00
lazy-nested-obligations-1.rs
lazy-nested-obligations-2.rs
lazy-nested-obligations-3.rs
more-object-bound.rs Deeply normalize obligations in BestObligation 2025-04-10 18:58:04 +00:00
more-object-bound.stderr Deeply normalize obligations in BestObligation 2025-04-10 18:58:04 +00:00
nested-alias-bound.rs
nested-obligations-with-bound-vars-gat.rs
no-param-env-const-fold.rs Do not eagerly fold consts in normalize_param_env_or_error if new solver 2025-05-21 09:23:36 +00:00
non-wf-ret.rs Check xform_ret_ty for WF in the new solver to improve method winnowing 2024-11-27 20:46:08 +00:00
normalize-in-implied_outlives_bounds.rs Deeply normalize when computing implied outlives bounds 2024-12-02 22:51:17 +00:00
object-soundness-requires-generalization.rs tests: ensure disabled tests have a reason 2025-04-12 15:24:25 +08:00
opportunistic-region-resolve.rs
overflow-plus-ambiguity-normalizes-to-response.rs Use MaybeCause::or to allow constraints from overflows if they are combined with ambiguity 2025-05-07 17:12:15 +00:00
param-discr-kind.rs
pointee.rs
pointer-like.rs
pointer-like.stderr
prefer-candidate-no-constraints.rs
prefer-param-env-on-ambiguity.rs
projection-discr-kind.rs
projection-discr-kind.stderr
rpitit-cycle-due-to-rigid.rs Don't assemble non-env/bound candidates if projection is rigid 2025-04-18 01:44:06 +00:00
slice-match-byte-lit.rs
specialization-transmute.rs handle specialization in the new trait solver 2025-04-25 17:59:33 +00:00
specialization-transmute.stderr handle specialization in the new trait solver 2025-04-25 17:59:33 +00:00
specialization-unconstrained.rs handle specialization in the new trait solver 2025-04-25 17:59:33 +00:00
specialization-unconstrained.stderr handle specialization in the new trait solver 2025-04-25 17:59:33 +00:00
stall-num-var-auto-trait.fallback.stderr
stall-num-var-auto-trait.rs
structural-resolve-field.rs
structurally-normalize-in-borrowck-field-projection.rs Structurally resolve before applying projection in borrowck 2024-11-27 20:39:49 +00:00
supertrait-alias-1.rs Fix replacing supertrait aliases in ReplaceProjectionWith 2025-04-16 20:05:55 +00:00
supertrait-alias-2.rs Fix replacing supertrait aliases in ReplaceProjectionWith 2025-04-16 20:05:55 +00:00
supertrait-alias-3.rs Fix replacing supertrait aliases in ReplaceProjectionWith 2025-04-16 20:05:55 +00:00
supertrait-alias-4.rs Fix replacing supertrait aliases in ReplaceProjectionWith 2025-04-16 20:05:55 +00:00
try-example.rs
unevaluated-const-impl-trait-ref.fails.stderr Spell out other trait diagnostic 2024-06-12 12:34:47 +00:00
unevaluated-const-impl-trait-ref.rs
unsafe-auto-trait-impl.rs
unsize-although-ambiguous.rs
unsize-good.rs Delete tuple unsizing 2025-02-27 10:26:33 +00:00
unsound-region-obligation.rs Pass spans around new solver 2025-02-05 18:32:06 +00:00
unsound-region-obligation.stderr Pass spans around new solver 2025-02-05 18:32:06 +00:00
well-formed-in-relate.rs Allow WellFormed goals to be returned from relating in new solver 2025-03-24 16:57:06 +00:00
well-formed-in-relate.stderr Allow WellFormed goals to be returned from relating in new solver 2025-03-24 16:57:06 +00:00
winnow-specializing-impls.rs