summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/next-solver
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:03 +0000
commit9918693037dce8aa4bb6f08741b6812923486c18 (patch)
tree21d2b40bec7e6a7ea664acee056eb3d08e15a1cf /tests/ui/traits/next-solver
parentReleasing progress-linux version 1.75.0+dfsg1-5~progress7.99u1. (diff)
downloadrustc-9918693037dce8aa4bb6f08741b6812923486c18.tar.xz
rustc-9918693037dce8aa4bb6f08741b6812923486c18.zip
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--tests/ui/traits/next-solver/alias-bound-preference.rs (renamed from tests/ui/traits/new-solver/alias-bound-preference.rs)2
-rw-r--r--tests/ui/traits/next-solver/alias-bound-unsound.rs (renamed from tests/ui/traits/new-solver/alias-bound-unsound.rs)3
-rw-r--r--tests/ui/traits/next-solver/alias-bound-unsound.stderr (renamed from tests/ui/traits/new-solver/alias-bound-unsound.stderr)10
-rw-r--r--tests/ui/traits/next-solver/alias-eq-in-canonical-response.rs (renamed from tests/ui/traits/new-solver/alias-eq-in-canonical-response.rs)2
-rw-r--r--tests/ui/traits/next-solver/alias-relate/deeply-nested-no-hang.rs22
-rw-r--r--tests/ui/traits/next-solver/alias-relate/opaque-hidden-ty-is-rigid-alias.rs8
-rw-r--r--tests/ui/traits/next-solver/alias-sub.rs (renamed from tests/ui/traits/new-solver/alias-sub.rs)2
-rw-r--r--tests/ui/traits/next-solver/alias_eq_cant_be_furthur_normalized.rs (renamed from tests/ui/traits/new-solver/alias_eq_cant_be_furthur_normalized.rs)2
-rw-r--r--tests/ui/traits/next-solver/alias_eq_dont_use_normalizes_to_if_substs_eq.rs (renamed from tests/ui/traits/new-solver/alias_eq_dont_use_normalizes_to_if_substs_eq.rs)2
-rw-r--r--tests/ui/traits/next-solver/alias_eq_simple.rs (renamed from tests/ui/traits/new-solver/alias_eq_simple.rs)2
-rw-r--r--tests/ui/traits/next-solver/alias_eq_substs_eq_not_intercrate.rs (renamed from tests/ui/traits/new-solver/alias_eq_substs_eq_not_intercrate.rs)2
-rw-r--r--tests/ui/traits/next-solver/alias_eq_substs_eq_not_intercrate.stderr (renamed from tests/ui/traits/new-solver/alias_eq_substs_eq_not_intercrate.stderr)2
-rw-r--r--tests/ui/traits/next-solver/array-default.rs8
-rw-r--r--tests/ui/traits/next-solver/assembly/assemble-normalizing-self-ty-impl-ambiguity.rs (renamed from tests/ui/traits/new-solver/assembly/assemble-normalizing-self-ty-impl-ambiguity.rs)2
-rw-r--r--tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.rs (renamed from tests/ui/traits/new-solver/assembly/runaway-impl-candidate-selection.rs)2
-rw-r--r--tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.stderr (renamed from tests/ui/traits/new-solver/assembly/runaway-impl-candidate-selection.stderr)2
-rw-r--r--tests/ui/traits/next-solver/async.fail.stderr (renamed from tests/ui/traits/new-solver/async.fail.stderr)2
-rw-r--r--tests/ui/traits/next-solver/async.rs (renamed from tests/ui/traits/new-solver/async.rs)2
-rw-r--r--tests/ui/traits/next-solver/auto-with-drop_tracking_mir.fail.stderr (renamed from tests/ui/traits/new-solver/auto-with-drop_tracking_mir.fail.stderr)2
-rw-r--r--tests/ui/traits/next-solver/auto-with-drop_tracking_mir.rs (renamed from tests/ui/traits/new-solver/auto-with-drop_tracking_mir.rs)2
-rw-r--r--tests/ui/traits/next-solver/borrowck-error.rs (renamed from tests/ui/traits/new-solver/borrowck-error.rs)2
-rw-r--r--tests/ui/traits/next-solver/borrowck-error.stderr (renamed from tests/ui/traits/new-solver/borrowck-error.stderr)2
-rw-r--r--tests/ui/traits/next-solver/builtin-fn-must-return-sized.rs (renamed from tests/ui/traits/new-solver/builtin-fn-must-return-sized.rs)2
-rw-r--r--tests/ui/traits/next-solver/builtin-fn-must-return-sized.stderr (renamed from tests/ui/traits/new-solver/builtin-fn-must-return-sized.stderr)2
-rw-r--r--tests/ui/traits/next-solver/canonical-int-var-eq-in-response.rs (renamed from tests/ui/traits/new-solver/canonical-int-var-eq-in-response.rs)2
-rw-r--r--tests/ui/traits/next-solver/canonical-ty-var-eq-in-response.rs (renamed from tests/ui/traits/new-solver/canonical-ty-var-eq-in-response.rs)2
-rw-r--r--tests/ui/traits/next-solver/canonicalize-effect-var.rs (renamed from tests/ui/traits/new-solver/canonicalize-effect-var.rs)2
-rw-r--r--tests/ui/traits/next-solver/cast-checks-handling-projections.rs6
-rw-r--r--tests/ui/traits/next-solver/closure-inference-guidance.rs (renamed from tests/ui/traits/new-solver/closure-inference-guidance.rs)2
-rw-r--r--tests/ui/traits/next-solver/closure-signature-inference-2.rs21
-rw-r--r--tests/ui/traits/next-solver/closure-signature-inference.rs15
-rw-r--r--tests/ui/traits/next-solver/closure-substs-ambiguity.rs7
-rw-r--r--tests/ui/traits/next-solver/coerce-ambig-alias-to-rigid-alias.rs15
-rw-r--r--tests/ui/traits/next-solver/coherence/issue-102048.rs (renamed from tests/ui/traits/new-solver/coherence/issue-102048.rs)2
-rw-r--r--tests/ui/traits/next-solver/coherence/issue-102048.stderr (renamed from tests/ui/traits/new-solver/coherence/issue-102048.stderr)2
-rw-r--r--tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-norm-overflow.rs (renamed from tests/ui/traits/new-solver/coherence/trait_ref_is_knowable-norm-overflow.rs)2
-rw-r--r--tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-norm-overflow.stderr12
-rw-r--r--tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-1.rs (renamed from tests/ui/traits/new-solver/coherence/trait_ref_is_knowable-normalization-1.rs)2
-rw-r--r--tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-2.rs (renamed from tests/ui/traits/new-solver/coherence/trait_ref_is_knowable-normalization-2.rs)2
-rw-r--r--tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-3.rs (renamed from tests/ui/traits/new-solver/coherence/trait_ref_is_knowable-normalization-3.rs)2
-rw-r--r--tests/ui/traits/next-solver/const-param-placeholder.fail.stderr (renamed from tests/ui/traits/new-solver/const-param-placeholder.fail.stderr)2
-rw-r--r--tests/ui/traits/next-solver/const-param-placeholder.rs (renamed from tests/ui/traits/new-solver/const-param-placeholder.rs)2
-rw-r--r--tests/ui/traits/next-solver/coroutine.fail.stderr (renamed from tests/ui/traits/new-solver/coroutine.fail.stderr)0
-rw-r--r--tests/ui/traits/next-solver/coroutine.rs (renamed from tests/ui/traits/new-solver/coroutine.rs)2
-rw-r--r--tests/ui/traits/next-solver/cycles/coinduction/fixpoint-exponential-growth.rs35
-rw-r--r--tests/ui/traits/next-solver/cycles/coinduction/fixpoint-exponential-growth.stderr (renamed from tests/ui/traits/new-solver/cycles/coinduction/fixpoint-exponential-growth.stderr)6
-rw-r--r--tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.rs (renamed from tests/ui/traits/new-solver/cycles/coinduction/incompleteness-unstable-result.rs)2
-rw-r--r--tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.stderr (renamed from tests/ui/traits/new-solver/cycles/coinduction/incompleteness-unstable-result.stderr)2
-rw-r--r--tests/ui/traits/next-solver/cycles/double-cycle-inductive-coinductive.rs (renamed from tests/ui/traits/new-solver/cycles/double-cycle-inductive-coinductive.rs)2
-rw-r--r--tests/ui/traits/next-solver/cycles/double-cycle-inductive-coinductive.stderr (renamed from tests/ui/traits/new-solver/cycles/double-cycle-inductive-coinductive.stderr)0
-rw-r--r--tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.rs (renamed from tests/ui/traits/new-solver/cycles/fixpoint-rerun-all-cycle-heads.rs)2
-rw-r--r--tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.stderr (renamed from tests/ui/traits/new-solver/cycles/fixpoint-rerun-all-cycle-heads.stderr)2
-rw-r--r--tests/ui/traits/next-solver/cycles/inductive-cycle-but-err.rs (renamed from tests/ui/traits/new-solver/cycles/inductive-cycle-but-err.rs)2
-rw-r--r--tests/ui/traits/next-solver/cycles/inductive-cycle-but-err.stderr (renamed from tests/ui/traits/new-solver/cycles/inductive-cycle-but-err.stderr)2
-rw-r--r--tests/ui/traits/next-solver/cycles/inductive-cycle-but-ok.rs (renamed from tests/ui/traits/new-solver/cycles/inductive-cycle-but-ok.rs)2
-rw-r--r--tests/ui/traits/next-solver/cycles/inductive-cycle-discarded-coinductive-constraints.rs (renamed from tests/ui/traits/new-solver/cycles/inductive-cycle-discarded-coinductive-constraints.rs)2
-rw-r--r--tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.rs33
-rw-r--r--tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.stderr16
-rw-r--r--tests/ui/traits/next-solver/cycles/inductive-not-on-stack.rs (renamed from tests/ui/traits/new-solver/cycles/inductive-not-on-stack.rs)2
-rw-r--r--tests/ui/traits/next-solver/cycles/inductive-not-on-stack.stderr (renamed from tests/ui/traits/new-solver/cycles/inductive-not-on-stack.stderr)0
-rw-r--r--tests/ui/traits/next-solver/cycles/leak-check-coinductive-cycle.rs (renamed from tests/ui/traits/new-solver/cycles/leak-check-coinductive-cycle.rs)2
-rw-r--r--tests/ui/traits/next-solver/cycles/provisional-result-done.rs (renamed from tests/ui/traits/new-solver/cycles/provisional-result-done.rs)2
-rw-r--r--tests/ui/traits/next-solver/deduce-closure-signature-after-normalization.rs (renamed from tests/ui/traits/new-solver/deduce-closure-signature-after-normalization.rs)2
-rw-r--r--tests/ui/traits/next-solver/deduce-ty-from-object.rs6
-rw-r--r--tests/ui/traits/next-solver/dedup-regions.rs (renamed from tests/ui/traits/new-solver/dedup-regions.rs)2
-rw-r--r--tests/ui/traits/next-solver/destruct.rs (renamed from tests/ui/traits/new-solver/destruct.rs)2
-rw-r--r--tests/ui/traits/next-solver/dont-coerce-infer-to-dyn.rs (renamed from tests/ui/traits/new-solver/dont-coerce-infer-to-dyn.rs)2
-rw-r--r--tests/ui/traits/next-solver/dont-elaborate-for-projections.rs (renamed from tests/ui/traits/new-solver/dont-elaborate-for-projections.rs)2
-rw-r--r--tests/ui/traits/next-solver/dont-ice-on-assoc-projection.rs (renamed from tests/ui/traits/new-solver/dont-ice-on-assoc-projection.rs)2
-rw-r--r--tests/ui/traits/next-solver/dont-ice-on-assoc-projection.stderr (renamed from tests/ui/traits/new-solver/dont-ice-on-assoc-projection.stderr)0
-rw-r--r--tests/ui/traits/next-solver/dont-loop-fulfill-on-region-constraints.rs (renamed from tests/ui/traits/new-solver/dont-loop-fulfill-on-region-constraints.rs)2
-rw-r--r--tests/ui/traits/next-solver/dont-normalize-proj-with-error.rs (renamed from tests/ui/traits/new-solver/dont-normalize-proj-with-error.rs)2
-rw-r--r--tests/ui/traits/next-solver/dont-normalize-proj-with-error.stderr (renamed from tests/ui/traits/new-solver/dont-normalize-proj-with-error.stderr)2
-rw-r--r--tests/ui/traits/next-solver/dont-remap-tait-substs.rs (renamed from tests/ui/traits/new-solver/dont-remap-tait-substs.rs)2
-rw-r--r--tests/ui/traits/next-solver/dont-type_of-tait-in-defining-scope.not_send.stderr (renamed from tests/ui/traits/new-solver/dont-type_of-tait-in-defining-scope.not_send.stderr)2
-rw-r--r--tests/ui/traits/next-solver/dont-type_of-tait-in-defining-scope.rs (renamed from tests/ui/traits/new-solver/dont-type_of-tait-in-defining-scope.rs)2
-rw-r--r--tests/ui/traits/next-solver/dyn-any-dont-prefer-impl.rs (renamed from tests/ui/traits/new-solver/dyn-any-dont-prefer-impl.rs)2
-rw-r--r--tests/ui/traits/next-solver/elaborate-item-bounds.rs12
-rw-r--r--tests/ui/traits/next-solver/equating-projection-cyclically.rs (renamed from tests/ui/traits/new-solver/equating-projection-cyclically.rs)7
-rw-r--r--tests/ui/traits/next-solver/escaping-bound-vars-in-writeback-normalization.rs (renamed from tests/ui/traits/new-solver/escaping-bound-vars-in-writeback-normalization.rs)2
-rw-r--r--tests/ui/traits/next-solver/float-canonical.rs8
-rw-r--r--tests/ui/traits/next-solver/fn-trait-closure.rs8
-rw-r--r--tests/ui/traits/next-solver/fn-trait.rs (renamed from tests/ui/traits/new-solver/fn-trait.rs)2
-rw-r--r--tests/ui/traits/next-solver/fn-trait.stderr (renamed from tests/ui/traits/new-solver/fn-trait.stderr)0
-rw-r--r--tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-1.rs (renamed from tests/ui/traits/new-solver/generalize/generalize-proj-new-universe-index-1.rs)2
-rw-r--r--tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-2.rs (renamed from tests/ui/traits/new-solver/generalize/generalize-proj-new-universe-index-2.rs)2
-rw-r--r--tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-2.stderr19
-rw-r--r--tests/ui/traits/next-solver/generalize/occurs-check-nested-alias.next.stderr11
-rw-r--r--tests/ui/traits/next-solver/generalize/occurs-check-nested-alias.rs38
-rw-r--r--tests/ui/traits/next-solver/higher-ranked-dyn-bounds.rs (renamed from tests/ui/traits/new-solver/higher-ranked-dyn-bounds.rs)2
-rw-r--r--tests/ui/traits/next-solver/int-var-alias-eq.rs (renamed from tests/ui/traits/new-solver/int-var-alias-eq.rs)2
-rw-r--r--tests/ui/traits/next-solver/int-var-is-send.rs8
-rw-r--r--tests/ui/traits/next-solver/issue-118950-root-region.rs22
-rw-r--r--tests/ui/traits/next-solver/issue-118950-root-region.stderr36
-rw-r--r--tests/ui/traits/next-solver/iter-filter-projection.rs (renamed from tests/ui/traits/new-solver/iter-filter-projection.rs)2
-rw-r--r--tests/ui/traits/next-solver/lazy-nested-obligations-1.rs (renamed from tests/ui/traits/new-solver/lazy-nested-obligations-1.rs)2
-rw-r--r--tests/ui/traits/next-solver/lazy-nested-obligations-2.rs (renamed from tests/ui/traits/new-solver/lazy-nested-obligations-2.rs)2
-rw-r--r--tests/ui/traits/next-solver/lazy-nested-obligations-3.rs (renamed from tests/ui/traits/new-solver/lazy-nested-obligations-3.rs)2
-rw-r--r--tests/ui/traits/next-solver/member-constraints-in-root-universe.rs (renamed from tests/ui/traits/new-solver/member-constraints-in-root-universe.rs)2
-rw-r--r--tests/ui/traits/next-solver/more-object-bound.rs (renamed from tests/ui/traits/new-solver/more-object-bound.rs)2
-rw-r--r--tests/ui/traits/next-solver/more-object-bound.stderr (renamed from tests/ui/traits/new-solver/more-object-bound.stderr)2
-rw-r--r--tests/ui/traits/next-solver/negative-coherence-bounds.rs (renamed from tests/ui/traits/new-solver/negative-coherence-bounds.rs)0
-rw-r--r--tests/ui/traits/next-solver/negative-coherence-bounds.stderr (renamed from tests/ui/traits/new-solver/negative-coherence-bounds.stderr)0
-rw-r--r--tests/ui/traits/next-solver/nested-alias-bound.rs (renamed from tests/ui/traits/new-solver/nested-alias-bound.rs)2
-rw-r--r--tests/ui/traits/next-solver/nested-obligations-with-bound-vars-gat.rs (renamed from tests/ui/traits/new-solver/nested-obligations-with-bound-vars-gat.rs)2
-rw-r--r--tests/ui/traits/next-solver/normalize-async-closure-in-trait.rs9
-rw-r--r--tests/ui/traits/next-solver/normalize-param-env-1.rs (renamed from tests/ui/traits/new-solver/normalize-param-env-1.rs)2
-rw-r--r--tests/ui/traits/next-solver/normalize-param-env-2.rs (renamed from tests/ui/traits/new-solver/normalize-param-env-2.rs)2
-rw-r--r--tests/ui/traits/next-solver/normalize-param-env-3.rs (renamed from tests/ui/traits/new-solver/normalize-param-env-3.rs)2
-rw-r--r--tests/ui/traits/next-solver/normalize-rcvr-for-inherent.rs (renamed from tests/ui/traits/new-solver/normalize-rcvr-for-inherent.rs)2
-rw-r--r--tests/ui/traits/next-solver/normalize-unsize-rhs.rs (renamed from tests/ui/traits/new-solver/normalize-unsize-rhs.rs)3
-rw-r--r--tests/ui/traits/next-solver/normalized-const-built-in-op.rs (renamed from tests/ui/traits/new-solver/normalized-const-built-in-op.rs)2
-rw-r--r--tests/ui/traits/next-solver/normalizes_to_ignores_unnormalizable_candidate.rs (renamed from tests/ui/traits/new-solver/normalizes_to_ignores_unnormalizable_candidate.rs)4
-rw-r--r--tests/ui/traits/next-solver/normalizes_to_ignores_unnormalizable_candidate.self_infer.stderr (renamed from tests/ui/traits/new-solver/normalizes_to_ignores_unnormalizable_candidate.self_infer.stderr)2
-rw-r--r--tests/ui/traits/next-solver/object-soundness-requires-generalization.rs (renamed from tests/ui/traits/new-solver/object-soundness-requires-generalization.rs)2
-rw-r--r--tests/ui/traits/next-solver/object-unsafety.rs (renamed from tests/ui/traits/new-solver/object-unsafety.rs)5
-rw-r--r--tests/ui/traits/next-solver/object-unsafety.stderr (renamed from tests/ui/traits/new-solver/object-unsafety.stderr)16
-rw-r--r--tests/ui/traits/next-solver/opportunistic-region-resolve.rs (renamed from tests/ui/traits/new-solver/opportunistic-region-resolve.rs)2
-rw-r--r--tests/ui/traits/next-solver/overflow/exponential-trait-goals.rs (renamed from tests/ui/traits/new-solver/overflow/exponential-trait-goals.rs)2
-rw-r--r--tests/ui/traits/next-solver/overflow/exponential-trait-goals.stderr (renamed from tests/ui/traits/new-solver/overflow/exponential-trait-goals.stderr)2
-rw-r--r--tests/ui/traits/next-solver/overflow/global-cache.rs (renamed from tests/ui/traits/new-solver/overflow/global-cache.rs)2
-rw-r--r--tests/ui/traits/next-solver/overflow/global-cache.stderr (renamed from tests/ui/traits/new-solver/overflow/global-cache.stderr)2
-rw-r--r--tests/ui/traits/next-solver/overflow/recursion-limit-normalizes-to-constraints.rs25
-rw-r--r--tests/ui/traits/next-solver/overflow/recursion-limit-zero-issue-115351.rs (renamed from tests/ui/traits/new-solver/overflow/recursion-limit-zero-issue-115351.rs)2
-rw-r--r--tests/ui/traits/next-solver/overflow/recursion-limit-zero-issue-115351.stderr (renamed from tests/ui/traits/new-solver/overflow/recursion-limit-zero-issue-115351.stderr)0
-rw-r--r--tests/ui/traits/next-solver/overflow/recursive-self-normalization-2.rs (renamed from tests/ui/traits/new-solver/overflow/recursive-self-normalization-2.rs)4
-rw-r--r--tests/ui/traits/next-solver/overflow/recursive-self-normalization-2.stderr (renamed from tests/ui/traits/new-solver/overflow/recursive-self-normalization-2.stderr)8
-rw-r--r--tests/ui/traits/next-solver/overflow/recursive-self-normalization.rs16
-rw-r--r--tests/ui/traits/next-solver/overflow/recursive-self-normalization.stderr (renamed from tests/ui/traits/new-solver/overflow/recursive-self-normalization.stderr)8
-rw-r--r--tests/ui/traits/next-solver/param-candidate-doesnt-shadow-project.rs (renamed from tests/ui/traits/new-solver/param-candidate-doesnt-shadow-project.rs)2
-rw-r--r--tests/ui/traits/next-solver/param-discr-kind.rs8
-rw-r--r--tests/ui/traits/next-solver/pointee.rs (renamed from tests/ui/traits/new-solver/pointee.rs)2
-rw-r--r--tests/ui/traits/next-solver/pointer-like.rs (renamed from tests/ui/traits/new-solver/pointer-like.rs)2
-rw-r--r--tests/ui/traits/next-solver/pointer-like.stderr (renamed from tests/ui/traits/new-solver/pointer-like.stderr)2
-rw-r--r--tests/ui/traits/next-solver/prefer-candidate-no-constraints.rs (renamed from tests/ui/traits/new-solver/prefer-candidate-no-constraints.rs)2
-rw-r--r--tests/ui/traits/next-solver/prefer-param-env-on-ambiguity.rs (renamed from tests/ui/traits/new-solver/prefer-param-env-on-ambiguity.rs)2
-rw-r--r--tests/ui/traits/next-solver/projection-discr-kind.rs (renamed from tests/ui/traits/new-solver/projection-discr-kind.rs)2
-rw-r--r--tests/ui/traits/next-solver/projection-discr-kind.stderr (renamed from tests/ui/traits/new-solver/projection-discr-kind.stderr)2
-rw-r--r--tests/ui/traits/next-solver/projection/param-env-trait-candidate-1.rs14
-rw-r--r--tests/ui/traits/next-solver/projection/param-env-trait-candidate-2.rs29
-rw-r--r--tests/ui/traits/next-solver/slice-match-byte-lit.rs (renamed from tests/ui/traits/new-solver/slice-match-byte-lit.rs)2
-rw-r--r--tests/ui/traits/next-solver/specialization-transmute.rs (renamed from tests/ui/traits/new-solver/specialization-transmute.rs)2
-rw-r--r--tests/ui/traits/next-solver/specialization-transmute.stderr (renamed from tests/ui/traits/new-solver/specialization-transmute.stderr)6
-rw-r--r--tests/ui/traits/next-solver/specialization-unconstrained.rs (renamed from tests/ui/traits/new-solver/specialization-unconstrained.rs)2
-rw-r--r--tests/ui/traits/next-solver/specialization-unconstrained.stderr (renamed from tests/ui/traits/new-solver/specialization-unconstrained.stderr)0
-rw-r--r--tests/ui/traits/next-solver/stall-num-var-auto-trait.fallback.stderr (renamed from tests/ui/traits/new-solver/stall-num-var-auto-trait.fallback.stderr)2
-rw-r--r--tests/ui/traits/next-solver/stall-num-var-auto-trait.rs (renamed from tests/ui/traits/new-solver/stall-num-var-auto-trait.rs)2
-rw-r--r--tests/ui/traits/next-solver/structural-resolve-field.rs (renamed from tests/ui/traits/new-solver/structural-resolve-field.rs)2
-rw-r--r--tests/ui/traits/next-solver/tait-eq-proj-2.rs (renamed from tests/ui/traits/new-solver/tait-eq-proj-2.rs)4
-rw-r--r--tests/ui/traits/next-solver/tait-eq-proj.rs (renamed from tests/ui/traits/new-solver/tait-eq-proj.rs)2
-rw-r--r--tests/ui/traits/next-solver/tait-eq-tait.rs (renamed from tests/ui/traits/new-solver/tait-eq-tait.rs)2
-rw-r--r--tests/ui/traits/next-solver/temporary-ambiguity.rs (renamed from tests/ui/traits/new-solver/temporary-ambiguity.rs)2
-rw-r--r--tests/ui/traits/next-solver/trait-upcast-lhs-needs-normalization.rs (renamed from tests/ui/traits/new-solver/trait-upcast-lhs-needs-normalization.rs)3
-rw-r--r--tests/ui/traits/next-solver/try-example.rs (renamed from tests/ui/traits/new-solver/try-example.rs)2
-rw-r--r--tests/ui/traits/next-solver/two-projection-param-candidates-are-ambiguous.rs (renamed from tests/ui/traits/new-solver/two-projection-param-candidates-are-ambiguous.rs)2
-rw-r--r--tests/ui/traits/next-solver/two-projection-param-candidates-are-ambiguous.stderr (renamed from tests/ui/traits/new-solver/two-projection-param-candidates-are-ambiguous.stderr)2
-rw-r--r--tests/ui/traits/next-solver/unevaluated-const-impl-trait-ref.fails.stderr (renamed from tests/ui/traits/new-solver/unevaluated-const-impl-trait-ref.fails.stderr)2
-rw-r--r--tests/ui/traits/next-solver/unevaluated-const-impl-trait-ref.rs (renamed from tests/ui/traits/new-solver/unevaluated-const-impl-trait-ref.rs)2
-rw-r--r--tests/ui/traits/next-solver/unsafe-auto-trait-impl.rs8
-rw-r--r--tests/ui/traits/next-solver/unsize-although-ambiguous.rs (renamed from tests/ui/traits/new-solver/unsize-although-ambiguous.rs)2
-rw-r--r--tests/ui/traits/next-solver/unsize-good.rs (renamed from tests/ui/traits/new-solver/unsize-good.rs)2
-rw-r--r--tests/ui/traits/next-solver/upcast-right-substs.rs (renamed from tests/ui/traits/new-solver/upcast-right-substs.rs)3
-rw-r--r--tests/ui/traits/next-solver/upcast-wrong-substs.rs11
-rw-r--r--tests/ui/traits/next-solver/upcast-wrong-substs.stderr (renamed from tests/ui/traits/new-solver/upcast-wrong-substs.stderr)4
-rw-r--r--tests/ui/traits/next-solver/winnow-specializing-impls.rs (renamed from tests/ui/traits/new-solver/winnow-specializing-impls.rs)2
165 files changed, 643 insertions, 157 deletions
diff --git a/tests/ui/traits/new-solver/alias-bound-preference.rs b/tests/ui/traits/next-solver/alias-bound-preference.rs
index e4e0f634e..1c6e12096 100644
--- a/tests/ui/traits/new-solver/alias-bound-preference.rs
+++ b/tests/ui/traits/next-solver/alias-bound-preference.rs
@@ -1,5 +1,5 @@
// revisions: old next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
// run-pass
// A test for https://github.com/rust-lang/trait-system-refactor-initiative/issues/45.
diff --git a/tests/ui/traits/new-solver/alias-bound-unsound.rs b/tests/ui/traits/next-solver/alias-bound-unsound.rs
index 825e874d7..4e279a84a 100644
--- a/tests/ui/traits/new-solver/alias-bound-unsound.rs
+++ b/tests/ui/traits/next-solver/alias-bound-unsound.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// Makes sure that alias bounds are not unsound!
@@ -27,5 +27,6 @@ fn main() {
//~| ERROR overflow evaluating the requirement `<() as Foo>::Item well-formed`
//~| ERROR overflow evaluating the requirement `String <: <() as Foo>::Item`
//~| ERROR overflow evaluating the requirement `&<() as Foo>::Item well-formed`
+ //~| ERROR overflow evaluating the requirement `<() as Foo>::Item normalizes-to _`
println!("{x}");
}
diff --git a/tests/ui/traits/new-solver/alias-bound-unsound.stderr b/tests/ui/traits/next-solver/alias-bound-unsound.stderr
index ca4b5c90f..ac3f19b3f 100644
--- a/tests/ui/traits/new-solver/alias-bound-unsound.stderr
+++ b/tests/ui/traits/next-solver/alias-bound-unsound.stderr
@@ -52,6 +52,14 @@ LL | drop(<() as Foo>::copy_me(&x));
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`alias_bound_unsound`)
-error: aborting due to 6 previous errors
+error[E0275]: overflow evaluating the requirement `<() as Foo>::Item normalizes-to _`
+ --> $DIR/alias-bound-unsound.rs:24:10
+ |
+LL | drop(<() as Foo>::copy_me(&x));
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`alias_bound_unsound`)
+
+error: aborting due to 7 previous errors
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/traits/new-solver/alias-eq-in-canonical-response.rs b/tests/ui/traits/next-solver/alias-eq-in-canonical-response.rs
index 4bfb6323a..aa7c94791 100644
--- a/tests/ui/traits/new-solver/alias-eq-in-canonical-response.rs
+++ b/tests/ui/traits/next-solver/alias-eq-in-canonical-response.rs
@@ -1,5 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
trait Foo {
type Gat<'a>
diff --git a/tests/ui/traits/next-solver/alias-relate/deeply-nested-no-hang.rs b/tests/ui/traits/next-solver/alias-relate/deeply-nested-no-hang.rs
new file mode 100644
index 000000000..91cfda37a
--- /dev/null
+++ b/tests/ui/traits/next-solver/alias-relate/deeply-nested-no-hang.rs
@@ -0,0 +1,22 @@
+// check-pass
+// compile-flags: -Znext-solver
+// regression test for trait-system-refactor-initiative#68
+trait Identity {
+ type Assoc: ?Sized;
+}
+
+impl<T: ?Sized> Identity for T {
+ type Assoc = T;
+}
+
+type Id<T> = <T as Identity>::Assoc;
+
+type Five<T> = Id<Id<Id<Id<Id<T>>>>>;
+type Ty<T> = Five<Five<Five<Five<Five<T>>>>>;
+
+trait Trait<T> {}
+
+impl<T> Trait<T> for Ty<T> {}
+impl Trait<u32> for Ty<i32> {}
+
+fn main() {}
diff --git a/tests/ui/traits/next-solver/alias-relate/opaque-hidden-ty-is-rigid-alias.rs b/tests/ui/traits/next-solver/alias-relate/opaque-hidden-ty-is-rigid-alias.rs
new file mode 100644
index 000000000..88bbd13f9
--- /dev/null
+++ b/tests/ui/traits/next-solver/alias-relate/opaque-hidden-ty-is-rigid-alias.rs
@@ -0,0 +1,8 @@
+// check-pass
+// compile-flags: -Znext-solver
+
+fn test<T: Iterator>(x: T::Item) -> impl Sized {
+ x
+}
+
+fn main() {}
diff --git a/tests/ui/traits/new-solver/alias-sub.rs b/tests/ui/traits/next-solver/alias-sub.rs
index 30c1981a9..f7f23a024 100644
--- a/tests/ui/traits/new-solver/alias-sub.rs
+++ b/tests/ui/traits/next-solver/alias-sub.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
trait Trait {
diff --git a/tests/ui/traits/new-solver/alias_eq_cant_be_furthur_normalized.rs b/tests/ui/traits/next-solver/alias_eq_cant_be_furthur_normalized.rs
index dc726ba51..04d1b9496 100644
--- a/tests/ui/traits/new-solver/alias_eq_cant_be_furthur_normalized.rs
+++ b/tests/ui/traits/next-solver/alias_eq_cant_be_furthur_normalized.rs
@@ -1,5 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check that a goal such as `alias-eq(<T as TraitB>::Assoc<bool>, <T as TraitB>::Assoc<?0>)`
// succeeds with a constraint that `?0 = bool`
diff --git a/tests/ui/traits/new-solver/alias_eq_dont_use_normalizes_to_if_substs_eq.rs b/tests/ui/traits/next-solver/alias_eq_dont_use_normalizes_to_if_substs_eq.rs
index 3c7fc7403..48157192a 100644
--- a/tests/ui/traits/new-solver/alias_eq_dont_use_normalizes_to_if_substs_eq.rs
+++ b/tests/ui/traits/next-solver/alias_eq_dont_use_normalizes_to_if_substs_eq.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
// (should not pass, should be turned into a coherence-only test)
diff --git a/tests/ui/traits/new-solver/alias_eq_simple.rs b/tests/ui/traits/next-solver/alias_eq_simple.rs
index 6792cf3ce..21ad1a4fa 100644
--- a/tests/ui/traits/new-solver/alias_eq_simple.rs
+++ b/tests/ui/traits/next-solver/alias_eq_simple.rs
@@ -1,5 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// test that the new solver can handle `alias-eq(<i32 as TraitB>::Assoc, u32)`
diff --git a/tests/ui/traits/new-solver/alias_eq_substs_eq_not_intercrate.rs b/tests/ui/traits/next-solver/alias_eq_substs_eq_not_intercrate.rs
index 204f6e8b0..4717aa804 100644
--- a/tests/ui/traits/new-solver/alias_eq_substs_eq_not_intercrate.rs
+++ b/tests/ui/traits/next-solver/alias_eq_substs_eq_not_intercrate.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check that a `alias-eq(<?a as TraitB>::Assoc, <?b as TraitB>::Assoc)` goal fails
// during coherence. We must not incorrectly constrain `?a` and `?b` to be
diff --git a/tests/ui/traits/new-solver/alias_eq_substs_eq_not_intercrate.stderr b/tests/ui/traits/next-solver/alias_eq_substs_eq_not_intercrate.stderr
index 46677a583..8c6840f72 100644
--- a/tests/ui/traits/new-solver/alias_eq_substs_eq_not_intercrate.stderr
+++ b/tests/ui/traits/next-solver/alias_eq_substs_eq_not_intercrate.stderr
@@ -8,6 +8,6 @@ LL | impl<U: TraitB> Overlaps<U> for <U as TraitB>::Assoc {}
|
= note: downstream crates may implement trait `TraitB` for type `std::boxed::Box<_>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/traits/next-solver/array-default.rs b/tests/ui/traits/next-solver/array-default.rs
new file mode 100644
index 000000000..6bfbce7d4
--- /dev/null
+++ b/tests/ui/traits/next-solver/array-default.rs
@@ -0,0 +1,8 @@
+// compile-flags: -Znext-solver
+// check-pass
+
+fn has_default<const N: usize>() where [(); N]: Default {}
+
+fn main() {
+ has_default::<1>();
+}
diff --git a/tests/ui/traits/new-solver/assembly/assemble-normalizing-self-ty-impl-ambiguity.rs b/tests/ui/traits/next-solver/assembly/assemble-normalizing-self-ty-impl-ambiguity.rs
index 826e8c1e0..4401abd07 100644
--- a/tests/ui/traits/new-solver/assembly/assemble-normalizing-self-ty-impl-ambiguity.rs
+++ b/tests/ui/traits/next-solver/assembly/assemble-normalizing-self-ty-impl-ambiguity.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
// Checks that we do not get ambiguity by considering an impl
diff --git a/tests/ui/traits/new-solver/assembly/runaway-impl-candidate-selection.rs b/tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.rs
index 1dca86d36..1edc1a8c5 100644
--- a/tests/ui/traits/new-solver/assembly/runaway-impl-candidate-selection.rs
+++ b/tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// In the new solver, we are trying to select `<?0 as Iterator>::Item: Debug`,
// which, naively can be unified with every impl of `Debug` if we're not careful.
diff --git a/tests/ui/traits/new-solver/assembly/runaway-impl-candidate-selection.stderr b/tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.stderr
index 414deb477..4bd55ee80 100644
--- a/tests/ui/traits/new-solver/assembly/runaway-impl-candidate-selection.stderr
+++ b/tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `iter`
LL | fn iter<T: Iterator>() -> <T as Iterator>::Item {
| ^^^^^^^^ required by this bound in `iter`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/traits/new-solver/async.fail.stderr b/tests/ui/traits/next-solver/async.fail.stderr
index 44097b556..ebd0ada26 100644
--- a/tests/ui/traits/new-solver/async.fail.stderr
+++ b/tests/ui/traits/next-solver/async.fail.stderr
@@ -12,6 +12,6 @@ note: required by a bound in `needs_async`
LL | fn needs_async(_: impl Future<Output = i32>) {}
| ^^^^^^^^^^^^ required by this bound in `needs_async`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/traits/new-solver/async.rs b/tests/ui/traits/next-solver/async.rs
index 155b71eb7..5833c0522 100644
--- a/tests/ui/traits/new-solver/async.rs
+++ b/tests/ui/traits/next-solver/async.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// edition: 2021
// revisions: pass fail
//[pass] check-pass
diff --git a/tests/ui/traits/new-solver/auto-with-drop_tracking_mir.fail.stderr b/tests/ui/traits/next-solver/auto-with-drop_tracking_mir.fail.stderr
index 4aefdd6bb..ac05dfb2d 100644
--- a/tests/ui/traits/new-solver/auto-with-drop_tracking_mir.fail.stderr
+++ b/tests/ui/traits/next-solver/auto-with-drop_tracking_mir.fail.stderr
@@ -13,6 +13,6 @@ note: required by a bound in `is_send`
LL | fn is_send(_: impl Send) {}
| ^^^^ required by this bound in `is_send`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/new-solver/auto-with-drop_tracking_mir.rs b/tests/ui/traits/next-solver/auto-with-drop_tracking_mir.rs
index 6b54718e3..d4010a552 100644
--- a/tests/ui/traits/new-solver/auto-with-drop_tracking_mir.rs
+++ b/tests/ui/traits/next-solver/auto-with-drop_tracking_mir.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// edition: 2021
// revisions: pass fail
//[pass] check-pass
diff --git a/tests/ui/traits/new-solver/borrowck-error.rs b/tests/ui/traits/next-solver/borrowck-error.rs
index 4787a2c7e..25f144594 100644
--- a/tests/ui/traits/new-solver/borrowck-error.rs
+++ b/tests/ui/traits/next-solver/borrowck-error.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
use std::collections::HashMap;
diff --git a/tests/ui/traits/new-solver/borrowck-error.stderr b/tests/ui/traits/next-solver/borrowck-error.stderr
index a7d820174..4cb41e7d5 100644
--- a/tests/ui/traits/new-solver/borrowck-error.stderr
+++ b/tests/ui/traits/next-solver/borrowck-error.stderr
@@ -7,6 +7,6 @@ LL | &HashMap::new()
| |temporary value created here
| returns a reference to data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/traits/new-solver/builtin-fn-must-return-sized.rs b/tests/ui/traits/next-solver/builtin-fn-must-return-sized.rs
index ba473653e..eab25214d 100644
--- a/tests/ui/traits/new-solver/builtin-fn-must-return-sized.rs
+++ b/tests/ui/traits/next-solver/builtin-fn-must-return-sized.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
#![feature(fn_traits)]
#![feature(unboxed_closures)]
diff --git a/tests/ui/traits/new-solver/builtin-fn-must-return-sized.stderr b/tests/ui/traits/next-solver/builtin-fn-must-return-sized.stderr
index 4eaa25961..08047852f 100644
--- a/tests/ui/traits/new-solver/builtin-fn-must-return-sized.stderr
+++ b/tests/ui/traits/next-solver/builtin-fn-must-return-sized.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `foo`
LL | fn foo<F: Fn<T>, T: Tuple>(f: Option<F>, t: T) {
| ^^^^^ required by this bound in `foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/new-solver/canonical-int-var-eq-in-response.rs b/tests/ui/traits/next-solver/canonical-int-var-eq-in-response.rs
index 4b013983a..ea2740523 100644
--- a/tests/ui/traits/new-solver/canonical-int-var-eq-in-response.rs
+++ b/tests/ui/traits/next-solver/canonical-int-var-eq-in-response.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
trait Mirror {
diff --git a/tests/ui/traits/new-solver/canonical-ty-var-eq-in-response.rs b/tests/ui/traits/next-solver/canonical-ty-var-eq-in-response.rs
index d1c6b1077..b1e4a9e58 100644
--- a/tests/ui/traits/new-solver/canonical-ty-var-eq-in-response.rs
+++ b/tests/ui/traits/next-solver/canonical-ty-var-eq-in-response.rs
@@ -1,5 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
trait Mirror {
type Item;
diff --git a/tests/ui/traits/new-solver/canonicalize-effect-var.rs b/tests/ui/traits/next-solver/canonicalize-effect-var.rs
index 35b69ed1a..4a13ba373 100644
--- a/tests/ui/traits/new-solver/canonicalize-effect-var.rs
+++ b/tests/ui/traits/next-solver/canonicalize-effect-var.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
#![feature(effects)]
diff --git a/tests/ui/traits/next-solver/cast-checks-handling-projections.rs b/tests/ui/traits/next-solver/cast-checks-handling-projections.rs
new file mode 100644
index 000000000..406b4dc12
--- /dev/null
+++ b/tests/ui/traits/next-solver/cast-checks-handling-projections.rs
@@ -0,0 +1,6 @@
+// compile-flags: -Znext-solver
+// check-pass
+
+fn main() {
+ (0u8 + 0u8) as char;
+}
diff --git a/tests/ui/traits/new-solver/closure-inference-guidance.rs b/tests/ui/traits/next-solver/closure-inference-guidance.rs
index d2ad0cc03..8175b92f8 100644
--- a/tests/ui/traits/new-solver/closure-inference-guidance.rs
+++ b/tests/ui/traits/next-solver/closure-inference-guidance.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
fn foo(i: isize) -> isize { i + 1 }
diff --git a/tests/ui/traits/next-solver/closure-signature-inference-2.rs b/tests/ui/traits/next-solver/closure-signature-inference-2.rs
new file mode 100644
index 000000000..8fece7ba9
--- /dev/null
+++ b/tests/ui/traits/next-solver/closure-signature-inference-2.rs
@@ -0,0 +1,21 @@
+// compile-flags: -Znext-solver
+// check-pass
+
+fn map<T: Default, U, F: FnOnce(T) -> U>(f: F) {
+ f(T::default());
+}
+
+fn main() {
+ map::<i32, _ /* ?U */, _ /* ?F */>(|x| x.to_string());
+ // PREVIOUSLY when confirming the `map` call, we register:
+ //
+ // (1.) ?F: FnOnce<(i32,)>
+ // (2.) <?F as FnOnce<(i32,)>>::Output projects-to ?U
+ //
+ // While (1.) is ambiguous, (2.) immediately gets processed
+ // and we infer `?U := <?F as FnOnce<(i32,)>>::Output`.
+ //
+ // Thus, the only pending obligation that remains is (1.).
+ // Since it is a trait obligation, we don't use it to deduce
+ // the closure signature, and we fail!
+}
diff --git a/tests/ui/traits/next-solver/closure-signature-inference.rs b/tests/ui/traits/next-solver/closure-signature-inference.rs
new file mode 100644
index 000000000..355fc7902
--- /dev/null
+++ b/tests/ui/traits/next-solver/closure-signature-inference.rs
@@ -0,0 +1,15 @@
+// compile-flags: -Znext-solver
+// check-pass
+
+struct A;
+impl A {
+ fn hi(self) {}
+}
+
+fn hello() -> Result<(A,), ()> {
+ Err(())
+}
+
+fn main() {
+ let x = hello().map(|(x,)| x.hi());
+}
diff --git a/tests/ui/traits/next-solver/closure-substs-ambiguity.rs b/tests/ui/traits/next-solver/closure-substs-ambiguity.rs
new file mode 100644
index 000000000..cc9ee58f2
--- /dev/null
+++ b/tests/ui/traits/next-solver/closure-substs-ambiguity.rs
@@ -0,0 +1,7 @@
+// compile-flags: -Znext-solver
+// check-pass
+
+fn main() {
+ let mut x: Vec<_> = vec![];
+ x.extend(Some(1i32).into_iter().map(|x| x));
+}
diff --git a/tests/ui/traits/next-solver/coerce-ambig-alias-to-rigid-alias.rs b/tests/ui/traits/next-solver/coerce-ambig-alias-to-rigid-alias.rs
new file mode 100644
index 000000000..bcb48b5ac
--- /dev/null
+++ b/tests/ui/traits/next-solver/coerce-ambig-alias-to-rigid-alias.rs
@@ -0,0 +1,15 @@
+// compile-flags: -Znext-solver
+// check-pass
+
+trait Trait {
+ type Assoc;
+}
+
+fn call<T: Trait>(_: <T as Trait>::Assoc, _: T) {}
+
+fn foo<T: Trait>(rigid: <T as Trait>::Assoc, t: T) {
+ // Check that we can coerce `<?0 as Trait>::Assoc` to `<T as Trait>::Assoc`.
+ call::<_ /* ?0 */>(rigid, t);
+}
+
+fn main() {}
diff --git a/tests/ui/traits/new-solver/coherence/issue-102048.rs b/tests/ui/traits/next-solver/coherence/issue-102048.rs
index 11636bfeb..600e63d4d 100644
--- a/tests/ui/traits/new-solver/coherence/issue-102048.rs
+++ b/tests/ui/traits/next-solver/coherence/issue-102048.rs
@@ -17,7 +17,7 @@
// that to `i32`. We then try to unify `i32` from `impl1` with `u32` from `impl2` which fails,
// causing coherence to consider these two impls distinct.
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
pub trait Trait<T> {}
pub trait WithAssoc1<'a> {
diff --git a/tests/ui/traits/new-solver/coherence/issue-102048.stderr b/tests/ui/traits/next-solver/coherence/issue-102048.stderr
index 41bf68a1d..4e93ae284 100644
--- a/tests/ui/traits/new-solver/coherence/issue-102048.stderr
+++ b/tests/ui/traits/next-solver/coherence/issue-102048.stderr
@@ -11,6 +11,6 @@ LL | / impl<T, U> Trait<for<'a> fn(<U as WithAssoc1<'a>>::Assoc, u32)> for (T, U
LL | | U: for<'a> WithAssoc1<'a>
| |_____________________________^ conflicting implementation for `(_, _)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/traits/new-solver/coherence/trait_ref_is_knowable-norm-overflow.rs b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-norm-overflow.rs
index b39ae0333..af471b5e1 100644
--- a/tests/ui/traits/new-solver/coherence/trait_ref_is_knowable-norm-overflow.rs
+++ b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-norm-overflow.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// Coherence should handle overflow while normalizing for
// `trait_ref_is_knowable` correctly.
diff --git a/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-norm-overflow.stderr b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-norm-overflow.stderr
new file mode 100644
index 000000000..e3c0dabf5
--- /dev/null
+++ b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-norm-overflow.stderr
@@ -0,0 +1,12 @@
+error[E0119]: conflicting implementations of trait `Trait` for type `<LocalTy as Overflow>::Assoc`
+ --> $DIR/trait_ref_is_knowable-norm-overflow.rs:17:1
+ |
+LL | impl<T: Copy> Trait for T {}
+ | ------------------------- first implementation here
+LL | struct LocalTy;
+LL | impl Trait for <LocalTy as Overflow>::Assoc {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `<LocalTy as Overflow>::Assoc`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/traits/new-solver/coherence/trait_ref_is_knowable-normalization-1.rs b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-1.rs
index c38e3baf5..e6ffb55b4 100644
--- a/tests/ui/traits/new-solver/coherence/trait_ref_is_knowable-normalization-1.rs
+++ b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-1.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
trait Id {
diff --git a/tests/ui/traits/new-solver/coherence/trait_ref_is_knowable-normalization-2.rs b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-2.rs
index 2d53266db..d16f9d22c 100644
--- a/tests/ui/traits/new-solver/coherence/trait_ref_is_knowable-normalization-2.rs
+++ b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-2.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
use std::future::{Future, IntoFuture};
diff --git a/tests/ui/traits/new-solver/coherence/trait_ref_is_knowable-normalization-3.rs b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-3.rs
index 2f27de4e4..90de6b847 100644
--- a/tests/ui/traits/new-solver/coherence/trait_ref_is_knowable-normalization-3.rs
+++ b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-3.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
trait Id {
diff --git a/tests/ui/traits/new-solver/const-param-placeholder.fail.stderr b/tests/ui/traits/next-solver/const-param-placeholder.fail.stderr
index 4db6e22e5..163710706 100644
--- a/tests/ui/traits/new-solver/const-param-placeholder.fail.stderr
+++ b/tests/ui/traits/next-solver/const-param-placeholder.fail.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `needs_foo`
LL | fn needs_foo<F: Foo>() {}
| ^^^ required by this bound in `needs_foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/new-solver/const-param-placeholder.rs b/tests/ui/traits/next-solver/const-param-placeholder.rs
index a83102a4c..c22bc54cf 100644
--- a/tests/ui/traits/new-solver/const-param-placeholder.rs
+++ b/tests/ui/traits/next-solver/const-param-placeholder.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// revisions: pass fail
//[pass] check-pass
diff --git a/tests/ui/traits/new-solver/coroutine.fail.stderr b/tests/ui/traits/next-solver/coroutine.fail.stderr
index 14e67727d..14e67727d 100644
--- a/tests/ui/traits/new-solver/coroutine.fail.stderr
+++ b/tests/ui/traits/next-solver/coroutine.fail.stderr
diff --git a/tests/ui/traits/new-solver/coroutine.rs b/tests/ui/traits/next-solver/coroutine.rs
index af16f70fb..727e23568 100644
--- a/tests/ui/traits/new-solver/coroutine.rs
+++ b/tests/ui/traits/next-solver/coroutine.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// edition: 2021
// revisions: pass fail
//[pass] check-pass
diff --git a/tests/ui/traits/next-solver/cycles/coinduction/fixpoint-exponential-growth.rs b/tests/ui/traits/next-solver/cycles/coinduction/fixpoint-exponential-growth.rs
new file mode 100644
index 000000000..947b52da7
--- /dev/null
+++ b/tests/ui/traits/next-solver/cycles/coinduction/fixpoint-exponential-growth.rs
@@ -0,0 +1,35 @@
+// compile-flags: -Znext-solver
+
+// Proving `W<?0>: Trait` instantiates `?0` with `(W<?1>, W<?2>)` and then
+// proves `W<?1>: Trait` and `W<?2>: Trait`, resulting in a coinductive cycle.
+//
+// Proving coinductive cycles runs until we reach a fixpoint. However, after
+// computing `try_evaluate_added_goals` in the second fixpoint iteration, the
+// self type already has a depth equal to the number of steps. This results
+// in enormous constraints, causing the canonicalizer to hang without ever
+// reaching the recursion limit. We currently avoid that by erasing the constraints
+// from overflow.
+//
+// This previously caused a hang in the trait solver, see
+// https://github.com/rust-lang/trait-system-refactor-initiative/issues/13.
+
+#![feature(rustc_attrs)]
+
+#[rustc_coinductive]
+trait Trait {}
+
+struct W<T>(T);
+
+impl<T, U> Trait for W<(W<T>, W<U>)>
+where
+ W<T>: Trait,
+ W<U>: Trait,
+{
+}
+
+fn impls<T: Trait>() {}
+
+fn main() {
+ impls::<W<_>>();
+ //~^ ERROR overflow evaluating the requirement
+}
diff --git a/tests/ui/traits/new-solver/cycles/coinduction/fixpoint-exponential-growth.stderr b/tests/ui/traits/next-solver/cycles/coinduction/fixpoint-exponential-growth.stderr
index 1ac0e2977..150100f2c 100644
--- a/tests/ui/traits/new-solver/cycles/coinduction/fixpoint-exponential-growth.stderr
+++ b/tests/ui/traits/next-solver/cycles/coinduction/fixpoint-exponential-growth.stderr
@@ -1,16 +1,16 @@
error[E0275]: overflow evaluating the requirement `W<_>: Trait`
- --> $DIR/fixpoint-exponential-growth.rs:29:13
+ --> $DIR/fixpoint-exponential-growth.rs:33:13
|
LL | impls::<W<_>>();
| ^^^^
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`fixpoint_exponential_growth`)
note: required by a bound in `impls`
- --> $DIR/fixpoint-exponential-growth.rs:26:13
+ --> $DIR/fixpoint-exponential-growth.rs:30:13
|
LL | fn impls<T: Trait>() {}
| ^^^^^ required by this bound in `impls`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/traits/new-solver/cycles/coinduction/incompleteness-unstable-result.rs b/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.rs
index 0cd14f05c..a3c07b987 100644
--- a/tests/ui/traits/new-solver/cycles/coinduction/incompleteness-unstable-result.rs
+++ b/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
#![feature(rustc_attrs)]
// This test is incredibly subtle. At its core the goal is to get a coinductive cycle,
diff --git a/tests/ui/traits/new-solver/cycles/coinduction/incompleteness-unstable-result.stderr b/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.stderr
index f1871ff05..d49321917 100644
--- a/tests/ui/traits/new-solver/cycles/coinduction/incompleteness-unstable-result.stderr
+++ b/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `impls_trait`
LL | fn impls_trait<T: ?Sized + Trait<U, V, D>, U: ?Sized, V: ?Sized, D: ?Sized>() {}
| ^^^^^^^^^^^^^^ required by this bound in `impls_trait`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/new-solver/cycles/double-cycle-inductive-coinductive.rs b/tests/ui/traits/next-solver/cycles/double-cycle-inductive-coinductive.rs
index 5617e45ad..0f19bc2c5 100644
--- a/tests/ui/traits/new-solver/cycles/double-cycle-inductive-coinductive.rs
+++ b/tests/ui/traits/next-solver/cycles/double-cycle-inductive-coinductive.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
#![feature(rustc_attrs)]
// Test that having both an inductive and a coinductive cycle
diff --git a/tests/ui/traits/new-solver/cycles/double-cycle-inductive-coinductive.stderr b/tests/ui/traits/next-solver/cycles/double-cycle-inductive-coinductive.stderr
index a3404da51..a3404da51 100644
--- a/tests/ui/traits/new-solver/cycles/double-cycle-inductive-coinductive.stderr
+++ b/tests/ui/traits/next-solver/cycles/double-cycle-inductive-coinductive.stderr
diff --git a/tests/ui/traits/new-solver/cycles/fixpoint-rerun-all-cycle-heads.rs b/tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.rs
index 279063923..c7e2e2d5e 100644
--- a/tests/ui/traits/new-solver/cycles/fixpoint-rerun-all-cycle-heads.rs
+++ b/tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
#![feature(rustc_attrs)]
// Check that we correctly rerun the trait solver for heads of cycles,
diff --git a/tests/ui/traits/new-solver/cycles/fixpoint-rerun-all-cycle-heads.stderr b/tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.stderr
index 4cbd08981..7b3075f4f 100644
--- a/tests/ui/traits/new-solver/cycles/fixpoint-rerun-all-cycle-heads.stderr
+++ b/tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.stderr
@@ -6,5 +6,5 @@ LL | fn check<'a, T: ?Sized>() {
LL | impls_trait::<'a, 'static, A<T>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/traits/new-solver/cycles/inductive-cycle-but-err.rs b/tests/ui/traits/next-solver/cycles/inductive-cycle-but-err.rs
index cda987898..fdc7afea3 100644
--- a/tests/ui/traits/new-solver/cycles/inductive-cycle-but-err.rs
+++ b/tests/ui/traits/next-solver/cycles/inductive-cycle-but-err.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
#![feature(trivial_bounds, marker_trait_attr)]
#![allow(trivial_bounds)]
// This previously triggered a bug in the provisional cache.
diff --git a/tests/ui/traits/new-solver/cycles/inductive-cycle-but-err.stderr b/tests/ui/traits/next-solver/cycles/inductive-cycle-but-err.stderr
index 57227321a..acacaf6a3 100644
--- a/tests/ui/traits/new-solver/cycles/inductive-cycle-but-err.stderr
+++ b/tests/ui/traits/next-solver/cycles/inductive-cycle-but-err.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `impls_trait`
LL | fn impls_trait<T: Trait>() {}
| ^^^^^ required by this bound in `impls_trait`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/new-solver/cycles/inductive-cycle-but-ok.rs b/tests/ui/traits/next-solver/cycles/inductive-cycle-but-ok.rs
index d4851eb69..d6d9762bb 100644
--- a/tests/ui/traits/new-solver/cycles/inductive-cycle-but-ok.rs
+++ b/tests/ui/traits/next-solver/cycles/inductive-cycle-but-ok.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
#![feature(trivial_bounds, marker_trait_attr)]
#![allow(trivial_bounds)]
diff --git a/tests/ui/traits/new-solver/cycles/inductive-cycle-discarded-coinductive-constraints.rs b/tests/ui/traits/next-solver/cycles/inductive-cycle-discarded-coinductive-constraints.rs
index 530e6d0ec..a32f7a13a 100644
--- a/tests/ui/traits/new-solver/cycles/inductive-cycle-discarded-coinductive-constraints.rs
+++ b/tests/ui/traits/next-solver/cycles/inductive-cycle-discarded-coinductive-constraints.rs
@@ -1,5 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
#![feature(rustc_attrs, marker_trait_attr)]
#[rustc_coinductive]
trait Trait {}
diff --git a/tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.rs b/tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.rs
new file mode 100644
index 000000000..efeb8d023
--- /dev/null
+++ b/tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.rs
@@ -0,0 +1,33 @@
+// compile-flags: -Znext-solver
+
+// This currently hangs if we do not erase constraints from
+// overflow.
+//
+// We set the provisional result of `W<?0>` to `?0 := W<_>`.
+// The next iteration does not simply result in a `?0 := W<W<_>` constraint as
+// one might expect, but instead each time we evaluate the nested `W<T>` goal we
+// apply the previously returned constraints: the first fixpoint iteration goes
+// as follows: `W<?1>: Trait` constrains `?1` to `W<?2>`, we then evaluate
+// `W<W<?2>>: Trait` the next time we try to prove the nested goal. This results
+// inn `W<W<W<?3>>>` and so on. This goes on until we reach overflow in
+// `try_evaluate_added_goals`. This means the provisional result after the
+// second fixpoint iteration is already `W<W<W<...>>>` with a size proportional
+// to the number of steps in `try_evaluate_added_goals`. The size then continues
+// to grow. The exponential blowup from having 2 nested goals per impl causes
+// the solver to hang without hitting the recursion limit.
+trait Trait {}
+
+struct W<T: ?Sized>(*const T);
+
+impl<T: ?Sized> Trait for W<W<T>>
+where
+ W<T>: Trait,
+ W<T>: Trait,
+{}
+
+fn impls_trait<T: Trait>() {}
+
+fn main() {
+ impls_trait::<W<_>>();
+ //~^ ERROR overflow evaluating the requirement
+}
diff --git a/tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.stderr b/tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.stderr
new file mode 100644
index 000000000..424519207
--- /dev/null
+++ b/tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.stderr
@@ -0,0 +1,16 @@
+error[E0275]: overflow evaluating the requirement `W<_>: Trait`
+ --> $DIR/inductive-fixpoint-hang.rs:31:19
+ |
+LL | impls_trait::<W<_>>();
+ | ^^^^
+ |
+ = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`inductive_fixpoint_hang`)
+note: required by a bound in `impls_trait`
+ --> $DIR/inductive-fixpoint-hang.rs:28:19
+ |
+LL | fn impls_trait<T: Trait>() {}
+ | ^^^^^ required by this bound in `impls_trait`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/traits/new-solver/cycles/inductive-not-on-stack.rs b/tests/ui/traits/next-solver/cycles/inductive-not-on-stack.rs
index f06b98a79..f2f6e009d 100644
--- a/tests/ui/traits/new-solver/cycles/inductive-not-on-stack.rs
+++ b/tests/ui/traits/next-solver/cycles/inductive-not-on-stack.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
#![feature(rustc_attrs, trivial_bounds)]
// We have to be careful here:
diff --git a/tests/ui/traits/new-solver/cycles/inductive-not-on-stack.stderr b/tests/ui/traits/next-solver/cycles/inductive-not-on-stack.stderr
index 859b3f3f1..859b3f3f1 100644
--- a/tests/ui/traits/new-solver/cycles/inductive-not-on-stack.stderr
+++ b/tests/ui/traits/next-solver/cycles/inductive-not-on-stack.stderr
diff --git a/tests/ui/traits/new-solver/cycles/leak-check-coinductive-cycle.rs b/tests/ui/traits/next-solver/cycles/leak-check-coinductive-cycle.rs
index a6d318726..9ff362ec8 100644
--- a/tests/ui/traits/new-solver/cycles/leak-check-coinductive-cycle.rs
+++ b/tests/ui/traits/next-solver/cycles/leak-check-coinductive-cycle.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
#![feature(rustc_attrs)]
diff --git a/tests/ui/traits/new-solver/cycles/provisional-result-done.rs b/tests/ui/traits/next-solver/cycles/provisional-result-done.rs
index 589d34dd7..0f3b84ce5 100644
--- a/tests/ui/traits/new-solver/cycles/provisional-result-done.rs
+++ b/tests/ui/traits/next-solver/cycles/provisional-result-done.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
// This tests checks that we update results in the provisional cache when
diff --git a/tests/ui/traits/new-solver/deduce-closure-signature-after-normalization.rs b/tests/ui/traits/next-solver/deduce-closure-signature-after-normalization.rs
index 51f62bc23..08f26686b 100644
--- a/tests/ui/traits/new-solver/deduce-closure-signature-after-normalization.rs
+++ b/tests/ui/traits/next-solver/deduce-closure-signature-after-normalization.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
trait Foo {
diff --git a/tests/ui/traits/next-solver/deduce-ty-from-object.rs b/tests/ui/traits/next-solver/deduce-ty-from-object.rs
new file mode 100644
index 000000000..b627fd720
--- /dev/null
+++ b/tests/ui/traits/next-solver/deduce-ty-from-object.rs
@@ -0,0 +1,6 @@
+// check-pass
+// compile-flags: -Znext-solver
+
+fn main() {
+ let x: Box<dyn Iterator<Item = ()>> = Box::new(std::iter::empty());
+}
diff --git a/tests/ui/traits/new-solver/dedup-regions.rs b/tests/ui/traits/next-solver/dedup-regions.rs
index f376f39a5..dd406333f 100644
--- a/tests/ui/traits/new-solver/dedup-regions.rs
+++ b/tests/ui/traits/next-solver/dedup-regions.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
struct A(*mut ());
diff --git a/tests/ui/traits/new-solver/destruct.rs b/tests/ui/traits/next-solver/destruct.rs
index 30d7777b7..5093344e4 100644
--- a/tests/ui/traits/new-solver/destruct.rs
+++ b/tests/ui/traits/next-solver/destruct.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
#![feature(const_trait_impl)]
diff --git a/tests/ui/traits/new-solver/dont-coerce-infer-to-dyn.rs b/tests/ui/traits/next-solver/dont-coerce-infer-to-dyn.rs
index c2ac80459..da07869f3 100644
--- a/tests/ui/traits/new-solver/dont-coerce-infer-to-dyn.rs
+++ b/tests/ui/traits/next-solver/dont-coerce-infer-to-dyn.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
use std::fmt::Display;
diff --git a/tests/ui/traits/new-solver/dont-elaborate-for-projections.rs b/tests/ui/traits/next-solver/dont-elaborate-for-projections.rs
index e60825006..9123871db 100644
--- a/tests/ui/traits/new-solver/dont-elaborate-for-projections.rs
+++ b/tests/ui/traits/next-solver/dont-elaborate-for-projections.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
trait Iter<'a, I: 'a>: Iterator<Item = &'a I> {}
diff --git a/tests/ui/traits/new-solver/dont-ice-on-assoc-projection.rs b/tests/ui/traits/next-solver/dont-ice-on-assoc-projection.rs
index b9798c79d..1e1ef8c23 100644
--- a/tests/ui/traits/new-solver/dont-ice-on-assoc-projection.rs
+++ b/tests/ui/traits/next-solver/dont-ice-on-assoc-projection.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next-coherence
+// compile-flags: -Znext-solver=coherence
// Makes sure we don't ICE on associated const projection when the feature gate
// is not enabled, since we should avoid encountering ICEs on stable if possible.
diff --git a/tests/ui/traits/new-solver/dont-ice-on-assoc-projection.stderr b/tests/ui/traits/next-solver/dont-ice-on-assoc-projection.stderr
index 368f5cd0c..368f5cd0c 100644
--- a/tests/ui/traits/new-solver/dont-ice-on-assoc-projection.stderr
+++ b/tests/ui/traits/next-solver/dont-ice-on-assoc-projection.stderr
diff --git a/tests/ui/traits/new-solver/dont-loop-fulfill-on-region-constraints.rs b/tests/ui/traits/next-solver/dont-loop-fulfill-on-region-constraints.rs
index b241e3bf8..a85098a95 100644
--- a/tests/ui/traits/new-solver/dont-loop-fulfill-on-region-constraints.rs
+++ b/tests/ui/traits/next-solver/dont-loop-fulfill-on-region-constraints.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
trait Eq<'a, 'b, T> {}
diff --git a/tests/ui/traits/new-solver/dont-normalize-proj-with-error.rs b/tests/ui/traits/next-solver/dont-normalize-proj-with-error.rs
index 19a6fa990..fd1682cd6 100644
--- a/tests/ui/traits/new-solver/dont-normalize-proj-with-error.rs
+++ b/tests/ui/traits/next-solver/dont-normalize-proj-with-error.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// Test that we don't incorrectly leak unconstrained inference variables
// if the projection contained an error. This caused an ICE in writeback.
diff --git a/tests/ui/traits/new-solver/dont-normalize-proj-with-error.stderr b/tests/ui/traits/next-solver/dont-normalize-proj-with-error.stderr
index 5a7459ec1..576ede52a 100644
--- a/tests/ui/traits/new-solver/dont-normalize-proj-with-error.stderr
+++ b/tests/ui/traits/next-solver/dont-normalize-proj-with-error.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `TypeError` in this scope
LL | fn type_error() -> TypeError { todo!() }
| ^^^^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/traits/new-solver/dont-remap-tait-substs.rs b/tests/ui/traits/next-solver/dont-remap-tait-substs.rs
index 309bee8aa..b089f0df3 100644
--- a/tests/ui/traits/new-solver/dont-remap-tait-substs.rs
+++ b/tests/ui/traits/next-solver/dont-remap-tait-substs.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
// Makes sure we don't prepopulate the MIR typeck of `define`
diff --git a/tests/ui/traits/new-solver/dont-type_of-tait-in-defining-scope.not_send.stderr b/tests/ui/traits/next-solver/dont-type_of-tait-in-defining-scope.not_send.stderr
index a31bfd958..076dab29d 100644
--- a/tests/ui/traits/new-solver/dont-type_of-tait-in-defining-scope.not_send.stderr
+++ b/tests/ui/traits/next-solver/dont-type_of-tait-in-defining-scope.not_send.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `needs_send`
LL | fn needs_send<T: Send>() {}
| ^^^^ required by this bound in `needs_send`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/traits/new-solver/dont-type_of-tait-in-defining-scope.rs b/tests/ui/traits/next-solver/dont-type_of-tait-in-defining-scope.rs
index 08f14d749..a1f38e69e 100644
--- a/tests/ui/traits/new-solver/dont-type_of-tait-in-defining-scope.rs
+++ b/tests/ui/traits/next-solver/dont-type_of-tait-in-defining-scope.rs
@@ -1,5 +1,5 @@
// revisions: is_send not_send
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
//[is_send] check-pass
#![feature(type_alias_impl_trait)]
diff --git a/tests/ui/traits/new-solver/dyn-any-dont-prefer-impl.rs b/tests/ui/traits/next-solver/dyn-any-dont-prefer-impl.rs
index af35a6195..bb1c24a00 100644
--- a/tests/ui/traits/new-solver/dyn-any-dont-prefer-impl.rs
+++ b/tests/ui/traits/next-solver/dyn-any-dont-prefer-impl.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
// Test that selection prefers the builtin trait object impl for `Any`
diff --git a/tests/ui/traits/next-solver/elaborate-item-bounds.rs b/tests/ui/traits/next-solver/elaborate-item-bounds.rs
new file mode 100644
index 000000000..0f1f6c044
--- /dev/null
+++ b/tests/ui/traits/next-solver/elaborate-item-bounds.rs
@@ -0,0 +1,12 @@
+// compile-flags: -Znext-solver
+// check-pass
+
+trait Foo {
+ type Bar: Bar;
+}
+
+trait Bar: Baz {}
+
+trait Baz {}
+
+fn main() {}
diff --git a/tests/ui/traits/new-solver/equating-projection-cyclically.rs b/tests/ui/traits/next-solver/equating-projection-cyclically.rs
index 2668da1b7..e7c80cfd7 100644
--- a/tests/ui/traits/new-solver/equating-projection-cyclically.rs
+++ b/tests/ui/traits/next-solver/equating-projection-cyclically.rs
@@ -1,4 +1,5 @@
-// compile-flags: -Ztrait-solver=next
+// check-pass
+// compile-flags: -Znext-solver
trait Test {
type Assoc;
@@ -22,7 +23,9 @@ fn main() {
let mut x: Inv<_> = Inv(None);
// This ends up equating `Inv<?x>` with `Inv<<?x as Test>::Assoc>`
// which fails the occurs check when generalizing `?x`.
+ //
+ // We end up emitting a delayed obligation, causing this to still
+ // succeed.
x = transform(x);
- //~^ ERROR mismatched types
x = Inv::<i32>(None);
}
diff --git a/tests/ui/traits/new-solver/escaping-bound-vars-in-writeback-normalization.rs b/tests/ui/traits/next-solver/escaping-bound-vars-in-writeback-normalization.rs
index 29784c32a..77bedc351 100644
--- a/tests/ui/traits/new-solver/escaping-bound-vars-in-writeback-normalization.rs
+++ b/tests/ui/traits/next-solver/escaping-bound-vars-in-writeback-normalization.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
trait Trivial {
diff --git a/tests/ui/traits/next-solver/float-canonical.rs b/tests/ui/traits/next-solver/float-canonical.rs
new file mode 100644
index 000000000..90d75bacb
--- /dev/null
+++ b/tests/ui/traits/next-solver/float-canonical.rs
@@ -0,0 +1,8 @@
+// compile-flags: -Znext-solver
+// check-pass
+
+fn foo(x: f64) {
+ let y = x + 1.0;
+}
+
+fn main() {}
diff --git a/tests/ui/traits/next-solver/fn-trait-closure.rs b/tests/ui/traits/next-solver/fn-trait-closure.rs
new file mode 100644
index 000000000..cd2ae1f6f
--- /dev/null
+++ b/tests/ui/traits/next-solver/fn-trait-closure.rs
@@ -0,0 +1,8 @@
+// compile-flags: -Znext-solver
+// check-pass
+
+fn require_fn(_: impl Fn() -> i32) {}
+
+fn main() {
+ require_fn(|| -> i32 { 1i32 });
+}
diff --git a/tests/ui/traits/new-solver/fn-trait.rs b/tests/ui/traits/next-solver/fn-trait.rs
index 0a19e6265..1e3d8a21c 100644
--- a/tests/ui/traits/new-solver/fn-trait.rs
+++ b/tests/ui/traits/next-solver/fn-trait.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
fn require_fn(_: impl Fn() -> i32) {}
diff --git a/tests/ui/traits/new-solver/fn-trait.stderr b/tests/ui/traits/next-solver/fn-trait.stderr
index e33487235..e33487235 100644
--- a/tests/ui/traits/new-solver/fn-trait.stderr
+++ b/tests/ui/traits/next-solver/fn-trait.stderr
diff --git a/tests/ui/traits/new-solver/generalize/generalize-proj-new-universe-index-1.rs b/tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-1.rs
index b0b9b6bbd..4a70bd5f8 100644
--- a/tests/ui/traits/new-solver/generalize/generalize-proj-new-universe-index-1.rs
+++ b/tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-1.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
// A minimization of an ambiguity when using typenum. See
diff --git a/tests/ui/traits/new-solver/generalize/generalize-proj-new-universe-index-2.rs b/tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-2.rs
index 94d645a98..70758e7de 100644
--- a/tests/ui/traits/new-solver/generalize/generalize-proj-new-universe-index-2.rs
+++ b/tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-2.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// known-bug: trait-system-refactor-initiative#60
// Generalizing a projection containing an inference variable
diff --git a/tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-2.stderr b/tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-2.stderr
new file mode 100644
index 000000000..4548ab1e2
--- /dev/null
+++ b/tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-2.stderr
@@ -0,0 +1,19 @@
+error[E0284]: type annotations needed
+ --> $DIR/generalize-proj-new-universe-index-2.rs:74:5
+ |
+LL | bound::<<Rigid as IdHigherRankedBound>::Assoc, <Wrapper<Leaf> as Id>::Assoc, _>()
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `V` declared on the function `bound`
+ |
+ = note: cannot satisfy `<<Rigid as IdHigherRankedBound>::Assoc as WithAssoc<<Wrapper<Leaf> as Id>::Assoc>>::Assoc == _`
+note: required by a bound in `bound`
+ --> $DIR/generalize-proj-new-universe-index-2.rs:69:21
+ |
+LL | fn bound<T: ?Sized, U: ?Sized, V: ?Sized>()
+ | ----- required by a bound in this function
+LL | where
+LL | T: WithAssoc<U, Assoc = V>,
+ | ^^^^^^^^^ required by this bound in `bound`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0284`.
diff --git a/tests/ui/traits/next-solver/generalize/occurs-check-nested-alias.next.stderr b/tests/ui/traits/next-solver/generalize/occurs-check-nested-alias.next.stderr
new file mode 100644
index 000000000..ad8b24a39
--- /dev/null
+++ b/tests/ui/traits/next-solver/generalize/occurs-check-nested-alias.next.stderr
@@ -0,0 +1,11 @@
+error[E0275]: overflow evaluating the requirement `<<T as Id<_>>::Id as Unnormalizable>::Assoc == _`
+ --> $DIR/occurs-check-nested-alias.rs:36:9
+ |
+LL | x = y;
+ | ^
+ |
+ = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`occurs_check_nested_alias`)
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/traits/next-solver/generalize/occurs-check-nested-alias.rs b/tests/ui/traits/next-solver/generalize/occurs-check-nested-alias.rs
new file mode 100644
index 000000000..e51508d68
--- /dev/null
+++ b/tests/ui/traits/next-solver/generalize/occurs-check-nested-alias.rs
@@ -0,0 +1,38 @@
+// revisions: old next
+//[old] check-pass
+
+// Currently always fails to generalize the outer alias, even if it
+// is treated as rigid by `alias-relate`.
+//[next] compile-flags: -Znext-solver
+//[next] known-bug: trait-system-refactor-initiative#8
+#![crate_type = "lib"]
+#![allow(unused)]
+trait Unnormalizable {
+ type Assoc;
+}
+
+trait Id<T> {
+ type Id;
+}
+impl<T, U> Id<T> for U {
+ type Id = U;
+}
+
+struct Inv<T>(*mut T);
+
+fn unconstrained<T>() -> T {
+ todo!()
+}
+
+fn create<T, U: Unnormalizable>(
+ x: &U,
+) -> (Inv<T>, Inv<<<U as Id<T>>::Id as Unnormalizable>::Assoc>) {
+ todo!()
+}
+
+fn foo<T: Unnormalizable>() {
+ let q = unconstrained();
+ let (mut x, y) = create::<_, _>(&q);
+ x = y;
+ drop::<T>(q);
+}
diff --git a/tests/ui/traits/new-solver/higher-ranked-dyn-bounds.rs b/tests/ui/traits/next-solver/higher-ranked-dyn-bounds.rs
index c886aeeda..b87210d7f 100644
--- a/tests/ui/traits/new-solver/higher-ranked-dyn-bounds.rs
+++ b/tests/ui/traits/next-solver/higher-ranked-dyn-bounds.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
trait Trait<'a> {
diff --git a/tests/ui/traits/new-solver/int-var-alias-eq.rs b/tests/ui/traits/next-solver/int-var-alias-eq.rs
index 790197e2d..26ba7f8e5 100644
--- a/tests/ui/traits/new-solver/int-var-alias-eq.rs
+++ b/tests/ui/traits/next-solver/int-var-alias-eq.rs
@@ -1,5 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// HIR typeck ends up equating `<?0i as Add>::Output == ?0i`.
// Want to make sure that we emit an alias-eq goal for this,
diff --git a/tests/ui/traits/next-solver/int-var-is-send.rs b/tests/ui/traits/next-solver/int-var-is-send.rs
new file mode 100644
index 000000000..d8b963f20
--- /dev/null
+++ b/tests/ui/traits/next-solver/int-var-is-send.rs
@@ -0,0 +1,8 @@
+// compile-flags: -Znext-solver
+// check-pass
+
+fn needs_send(_: impl Send) {}
+
+fn main() {
+ needs_send(1);
+}
diff --git a/tests/ui/traits/next-solver/issue-118950-root-region.rs b/tests/ui/traits/next-solver/issue-118950-root-region.rs
new file mode 100644
index 000000000..10fb7d525
--- /dev/null
+++ b/tests/ui/traits/next-solver/issue-118950-root-region.rs
@@ -0,0 +1,22 @@
+// compile-flags: -Znext-solver
+//
+// This is a gnarly test but I don't know how to minimize it, frankly.
+
+#![feature(lazy_type_alias)]
+//~^ WARN the feature `lazy_type_alias` is incomplete
+
+trait ToUnit<'a> {
+ type Unit;
+}
+
+trait Overlap<T> {}
+
+type Assoc<'a, T> = <*const T as ToUnit<'a>>::Unit;
+
+impl<T> Overlap<T> for T {}
+
+impl<T> Overlap<for<'a> fn(Assoc<'a, T>)> for T where Missing: Overlap<T> {}
+//~^ ERROR conflicting implementations of trait `Overlap<fn(_)>` for type `fn(_)`
+//~| ERROR cannot find type `Missing` in this scope
+
+fn main() {}
diff --git a/tests/ui/traits/next-solver/issue-118950-root-region.stderr b/tests/ui/traits/next-solver/issue-118950-root-region.stderr
new file mode 100644
index 000000000..c16a48d5f
--- /dev/null
+++ b/tests/ui/traits/next-solver/issue-118950-root-region.stderr
@@ -0,0 +1,36 @@
+error[E0412]: cannot find type `Missing` in this scope
+ --> $DIR/issue-118950-root-region.rs:18:55
+ |
+LL | impl<T> Overlap<for<'a> fn(Assoc<'a, T>)> for T where Missing: Overlap<T> {}
+ | ^^^^^^^ not found in this scope
+
+warning: the feature `lazy_type_alias` is incomplete and may not be safe to use and/or cause compiler crashes
+ --> $DIR/issue-118950-root-region.rs:5:12
+ |
+LL | #![feature(lazy_type_alias)]
+ | ^^^^^^^^^^^^^^^
+ |
+ = note: see issue #112792 <https://github.com/rust-lang/rust/issues/112792> for more information
+ = note: `#[warn(incomplete_features)]` on by default
+
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Weak, AliasTy { args: [ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a), 'a) }), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Weak, AliasTy { args: [RePlaceholder(!1_BoundRegion { var: 0, kind: BrNamed(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a), 'a) }), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Weak, AliasTy { args: [ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a), 'a) }), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Weak, AliasTy { args: [RePlaceholder(!1_BoundRegion { var: 0, kind: BrNamed(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a), 'a) }), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Weak, AliasTy { args: [ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a), 'a) }), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Weak, AliasTy { args: [RePlaceholder(!1_BoundRegion { var: 0, kind: BrNamed(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a), 'a) }), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Weak, AliasTy { args: [ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a), 'a) }), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Weak, AliasTy { args: [RePlaceholder(!1_BoundRegion { var: 0, kind: BrNamed(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a), 'a) }), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc) })
+error[E0119]: conflicting implementations of trait `Overlap<fn(_)>` for type `fn(_)`
+ --> $DIR/issue-118950-root-region.rs:18:1
+ |
+LL | impl<T> Overlap<T> for T {}
+ | ------------------------ first implementation here
+LL |
+LL | impl<T> Overlap<for<'a> fn(Assoc<'a, T>)> for T where Missing: Overlap<T> {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `fn(_)`
+
+error: aborting due to 2 previous errors; 1 warning emitted
+
+Some errors have detailed explanations: E0119, E0412.
+For more information about an error, try `rustc --explain E0119`.
diff --git a/tests/ui/traits/new-solver/iter-filter-projection.rs b/tests/ui/traits/next-solver/iter-filter-projection.rs
index 8fb62323a..f948831ad 100644
--- a/tests/ui/traits/new-solver/iter-filter-projection.rs
+++ b/tests/ui/traits/next-solver/iter-filter-projection.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
use std::{iter, slice};
diff --git a/tests/ui/traits/new-solver/lazy-nested-obligations-1.rs b/tests/ui/traits/next-solver/lazy-nested-obligations-1.rs
index af00cbb3b..f9e73a93c 100644
--- a/tests/ui/traits/new-solver/lazy-nested-obligations-1.rs
+++ b/tests/ui/traits/next-solver/lazy-nested-obligations-1.rs
@@ -1,5 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// Issue 94358
fn foo<C>(_: C)
diff --git a/tests/ui/traits/new-solver/lazy-nested-obligations-2.rs b/tests/ui/traits/next-solver/lazy-nested-obligations-2.rs
index 20f504928..b85f9d973 100644
--- a/tests/ui/traits/new-solver/lazy-nested-obligations-2.rs
+++ b/tests/ui/traits/next-solver/lazy-nested-obligations-2.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
pub trait With {
diff --git a/tests/ui/traits/new-solver/lazy-nested-obligations-3.rs b/tests/ui/traits/next-solver/lazy-nested-obligations-3.rs
index baf399572..5fb4832dd 100644
--- a/tests/ui/traits/new-solver/lazy-nested-obligations-3.rs
+++ b/tests/ui/traits/next-solver/lazy-nested-obligations-3.rs
@@ -1,5 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// Issue 96750
use std::marker::PhantomData;
diff --git a/tests/ui/traits/new-solver/member-constraints-in-root-universe.rs b/tests/ui/traits/next-solver/member-constraints-in-root-universe.rs
index 97c443058..16e95e94c 100644
--- a/tests/ui/traits/new-solver/member-constraints-in-root-universe.rs
+++ b/tests/ui/traits/next-solver/member-constraints-in-root-universe.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
trait Trait {
diff --git a/tests/ui/traits/new-solver/more-object-bound.rs b/tests/ui/traits/next-solver/more-object-bound.rs
index bb730b18e..8522f034d 100644
--- a/tests/ui/traits/new-solver/more-object-bound.rs
+++ b/tests/ui/traits/next-solver/more-object-bound.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// From #80800
trait SuperTrait {
diff --git a/tests/ui/traits/new-solver/more-object-bound.stderr b/tests/ui/traits/next-solver/more-object-bound.stderr
index 54965dee1..e3be2931e 100644
--- a/tests/ui/traits/new-solver/more-object-bound.stderr
+++ b/tests/ui/traits/next-solver/more-object-bound.stderr
@@ -17,6 +17,6 @@ help: consider introducing a `where` clause, but there might be an alternative b
LL | fn transmute<A, B>(x: A) -> B where dyn Trait<A = A, B = B>: Trait {
| ++++++++++++++++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/new-solver/negative-coherence-bounds.rs b/tests/ui/traits/next-solver/negative-coherence-bounds.rs
index 5436b02c3..5436b02c3 100644
--- a/tests/ui/traits/new-solver/negative-coherence-bounds.rs
+++ b/tests/ui/traits/next-solver/negative-coherence-bounds.rs
diff --git a/tests/ui/traits/new-solver/negative-coherence-bounds.stderr b/tests/ui/traits/next-solver/negative-coherence-bounds.stderr
index 4127f51f5..4127f51f5 100644
--- a/tests/ui/traits/new-solver/negative-coherence-bounds.stderr
+++ b/tests/ui/traits/next-solver/negative-coherence-bounds.stderr
diff --git a/tests/ui/traits/new-solver/nested-alias-bound.rs b/tests/ui/traits/next-solver/nested-alias-bound.rs
index c365902db..2e3de0ac6 100644
--- a/tests/ui/traits/new-solver/nested-alias-bound.rs
+++ b/tests/ui/traits/next-solver/nested-alias-bound.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
trait A {
diff --git a/tests/ui/traits/new-solver/nested-obligations-with-bound-vars-gat.rs b/tests/ui/traits/next-solver/nested-obligations-with-bound-vars-gat.rs
index 92bad9590..94c6c2856 100644
--- a/tests/ui/traits/new-solver/nested-obligations-with-bound-vars-gat.rs
+++ b/tests/ui/traits/next-solver/nested-obligations-with-bound-vars-gat.rs
@@ -1,5 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// Issue 96230
use std::fmt::Debug;
diff --git a/tests/ui/traits/next-solver/normalize-async-closure-in-trait.rs b/tests/ui/traits/next-solver/normalize-async-closure-in-trait.rs
new file mode 100644
index 000000000..b58db2be8
--- /dev/null
+++ b/tests/ui/traits/next-solver/normalize-async-closure-in-trait.rs
@@ -0,0 +1,9 @@
+// compile-flags: -Znext-solver
+// check-pass
+// edition:2021
+
+trait Foo {
+ async fn bar() {}
+}
+
+fn main() {}
diff --git a/tests/ui/traits/new-solver/normalize-param-env-1.rs b/tests/ui/traits/next-solver/normalize-param-env-1.rs
index b02a5d623..92d405137 100644
--- a/tests/ui/traits/new-solver/normalize-param-env-1.rs
+++ b/tests/ui/traits/next-solver/normalize-param-env-1.rs
@@ -1,5 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// Issue 108933
trait Add<Rhs> {
diff --git a/tests/ui/traits/new-solver/normalize-param-env-2.rs b/tests/ui/traits/next-solver/normalize-param-env-2.rs
index 7c2cebdd2..ce084651b 100644
--- a/tests/ui/traits/new-solver/normalize-param-env-2.rs
+++ b/tests/ui/traits/next-solver/normalize-param-env-2.rs
@@ -1,5 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// Issue 92505
trait A<T> {
diff --git a/tests/ui/traits/new-solver/normalize-param-env-3.rs b/tests/ui/traits/next-solver/normalize-param-env-3.rs
index ce2974b2a..e15e1155a 100644
--- a/tests/ui/traits/new-solver/normalize-param-env-3.rs
+++ b/tests/ui/traits/next-solver/normalize-param-env-3.rs
@@ -1,5 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// Issue 100177
trait GenericTrait<T> {}
diff --git a/tests/ui/traits/new-solver/normalize-rcvr-for-inherent.rs b/tests/ui/traits/next-solver/normalize-rcvr-for-inherent.rs
index d70534feb..d308b1695 100644
--- a/tests/ui/traits/new-solver/normalize-rcvr-for-inherent.rs
+++ b/tests/ui/traits/next-solver/normalize-rcvr-for-inherent.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
// Verify that we can assemble inherent impl candidates on a possibly
diff --git a/tests/ui/traits/new-solver/normalize-unsize-rhs.rs b/tests/ui/traits/next-solver/normalize-unsize-rhs.rs
index a398ab4f2..08bb0cf42 100644
--- a/tests/ui/traits/new-solver/normalize-unsize-rhs.rs
+++ b/tests/ui/traits/next-solver/normalize-unsize-rhs.rs
@@ -1,6 +1,5 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
-
#![feature(trait_upcasting)]
trait A {}
diff --git a/tests/ui/traits/new-solver/normalized-const-built-in-op.rs b/tests/ui/traits/next-solver/normalized-const-built-in-op.rs
index 2443e5178..0fffe7b43 100644
--- a/tests/ui/traits/new-solver/normalized-const-built-in-op.rs
+++ b/tests/ui/traits/next-solver/normalized-const-built-in-op.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
const fn foo() {
diff --git a/tests/ui/traits/new-solver/normalizes_to_ignores_unnormalizable_candidate.rs b/tests/ui/traits/next-solver/normalizes_to_ignores_unnormalizable_candidate.rs
index 46343241b..7dc87dacc 100644
--- a/tests/ui/traits/new-solver/normalizes_to_ignores_unnormalizable_candidate.rs
+++ b/tests/ui/traits/next-solver/normalizes_to_ignores_unnormalizable_candidate.rs
@@ -1,5 +1,5 @@
// [no_self_infer] check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// revisions: self_infer no_self_infer
// checks that the new solver is smart enough to infer `?0 = U` when solving:
@@ -7,7 +7,7 @@
// with `normalizes-to(<Vec<U> as Trait>::Assoc, u8)` in the paramenv even when
// there is a separate `Vec<T>: Trait` bound in the paramenv.
//
-// FIXME(-Ztrait-solver=next)
+// FIXME(-Znext-solver)
// This could also compile for `normalizes-to(<?0 as Trait>::Assoc, u8)` but
// we currently immediately consider a goal ambiguous if the self type is an
// inference variable.
diff --git a/tests/ui/traits/new-solver/normalizes_to_ignores_unnormalizable_candidate.self_infer.stderr b/tests/ui/traits/next-solver/normalizes_to_ignores_unnormalizable_candidate.self_infer.stderr
index f482e8cfa..c1a8b74df 100644
--- a/tests/ui/traits/new-solver/normalizes_to_ignores_unnormalizable_candidate.self_infer.stderr
+++ b/tests/ui/traits/next-solver/normalizes_to_ignores_unnormalizable_candidate.self_infer.stderr
@@ -17,6 +17,6 @@ help: consider specifying the generic argument
LL | foo::<T>(unconstrained())
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/traits/new-solver/object-soundness-requires-generalization.rs b/tests/ui/traits/next-solver/object-soundness-requires-generalization.rs
index d02dada72..6e709d9ae 100644
--- a/tests/ui/traits/new-solver/object-soundness-requires-generalization.rs
+++ b/tests/ui/traits/next-solver/object-soundness-requires-generalization.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// ignore-test
trait Trait {
diff --git a/tests/ui/traits/new-solver/object-unsafety.rs b/tests/ui/traits/next-solver/object-unsafety.rs
index da843c914..cfa53948b 100644
--- a/tests/ui/traits/new-solver/object-unsafety.rs
+++ b/tests/ui/traits/next-solver/object-unsafety.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
trait Setup {
type From: Copy;
@@ -13,11 +13,10 @@ pub fn copy_any<T>(t: &T) -> T {
//~^ ERROR the type `&<dyn Setup<From = T> as Setup>::From` is not well-formed
//~| ERROR the trait bound `dyn Setup<From = T>: Setup` is not satisfied
//~| ERROR mismatched types
- //~| ERROR mismatched types
//~| ERROR the type `<dyn Setup<From = T> as Setup>::From` is not well-formed
//~| ERROR the size for values of type `<dyn Setup<From = T> as Setup>::From` cannot be known at compilation time
- // FIXME(-Ztrait-solver=next): These error messages are horrible and some of them
+ // FIXME(-Znext-solver): These error messages are horrible and some of them
// are even simple fallout from previous error.
}
diff --git a/tests/ui/traits/new-solver/object-unsafety.stderr b/tests/ui/traits/next-solver/object-unsafety.stderr
index 914a8f9d4..ee38c256e 100644
--- a/tests/ui/traits/new-solver/object-unsafety.stderr
+++ b/tests/ui/traits/next-solver/object-unsafety.stderr
@@ -36,20 +36,6 @@ note: function defined here
LL | fn copy<U: Setup + ?Sized>(from: &U::From) -> U::From {
| ^^^^ --------------
-error[E0308]: mismatched types
- --> $DIR/object-unsafety.rs:12:5
- |
-LL | pub fn copy_any<T>(t: &T) -> T {
- | - - expected `T` because of return type
- | |
- | expected this type parameter
-LL | copy::<dyn Setup<From=T>>(t)
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
- |
- = note: expected type parameter `T`
- found associated type `<dyn Setup<From = T> as Setup>::From`
- = note: you might be missing a type parameter or trait bound
-
error: the type `<dyn Setup<From = T> as Setup>::From` is not well-formed
--> $DIR/object-unsafety.rs:12:5
|
@@ -72,7 +58,7 @@ help: consider further restricting the associated type
LL | pub fn copy_any<T>(t: &T) -> T where <dyn Setup<From = T> as Setup>::From: Sized {
| +++++++++++++++++++++++++++++++++++++++++++++++++
-error: aborting due to 6 previous errors
+error: aborting due to 5 previous errors
Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/new-solver/opportunistic-region-resolve.rs b/tests/ui/traits/next-solver/opportunistic-region-resolve.rs
index 2610789cd..d852332d0 100644
--- a/tests/ui/traits/new-solver/opportunistic-region-resolve.rs
+++ b/tests/ui/traits/next-solver/opportunistic-region-resolve.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
#![feature(rustc_attrs)]
diff --git a/tests/ui/traits/new-solver/overflow/exponential-trait-goals.rs b/tests/ui/traits/next-solver/overflow/exponential-trait-goals.rs
index 3d2e70a63..a465bcecf 100644
--- a/tests/ui/traits/new-solver/overflow/exponential-trait-goals.rs
+++ b/tests/ui/traits/next-solver/overflow/exponential-trait-goals.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
trait Trait {}
diff --git a/tests/ui/traits/new-solver/overflow/exponential-trait-goals.stderr b/tests/ui/traits/next-solver/overflow/exponential-trait-goals.stderr
index 023efc41a..90b54b1e7 100644
--- a/tests/ui/traits/new-solver/overflow/exponential-trait-goals.stderr
+++ b/tests/ui/traits/next-solver/overflow/exponential-trait-goals.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `impls`
LL | fn impls<T: Trait>() {}
| ^^^^^ required by this bound in `impls`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/traits/new-solver/overflow/global-cache.rs b/tests/ui/traits/next-solver/overflow/global-cache.rs
index adc03da04..fe4032ca6 100644
--- a/tests/ui/traits/new-solver/overflow/global-cache.rs
+++ b/tests/ui/traits/next-solver/overflow/global-cache.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// Check that we consider the reached depth of global cache
// entries when detecting overflow. We would otherwise be unstable
diff --git a/tests/ui/traits/new-solver/overflow/global-cache.stderr b/tests/ui/traits/next-solver/overflow/global-cache.stderr
index ebb03d84b..676166193 100644
--- a/tests/ui/traits/new-solver/overflow/global-cache.stderr
+++ b/tests/ui/traits/next-solver/overflow/global-cache.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `impls_trait`
LL | fn impls_trait<T: Trait>() {}
| ^^^^^ required by this bound in `impls_trait`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/traits/next-solver/overflow/recursion-limit-normalizes-to-constraints.rs b/tests/ui/traits/next-solver/overflow/recursion-limit-normalizes-to-constraints.rs
new file mode 100644
index 000000000..03ef93dc2
--- /dev/null
+++ b/tests/ui/traits/next-solver/overflow/recursion-limit-normalizes-to-constraints.rs
@@ -0,0 +1,25 @@
+// compile-flags: -Znext-solver=coherence
+// check-pass
+
+// A regression test for trait-system-refactor-initiative#70.
+
+trait Trait {
+ type Assoc;
+}
+
+struct W<T: ?Sized>(*mut T);
+impl<T: ?Sized> Trait for W<W<T>>
+where
+ W<T>: Trait,
+{
+ type Assoc = ();
+}
+
+trait NoOverlap {}
+impl<T: Trait<Assoc = u32>> NoOverlap for T {}
+// `Projection(<W<_> as Trait>::Assoc, u32)` should result in error even
+// though applying the impl results in overflow. This is necessary to match
+// the behavior of the old solver.
+impl<T: ?Sized> NoOverlap for W<T> {}
+
+fn main() {}
diff --git a/tests/ui/traits/new-solver/overflow/recursion-limit-zero-issue-115351.rs b/tests/ui/traits/next-solver/overflow/recursion-limit-zero-issue-115351.rs
index 539c9614e..52a17a142 100644
--- a/tests/ui/traits/new-solver/overflow/recursion-limit-zero-issue-115351.rs
+++ b/tests/ui/traits/next-solver/overflow/recursion-limit-zero-issue-115351.rs
@@ -2,7 +2,7 @@
//~| ERROR overflow evaluating the requirement `Self: Trait`
// This is a non-regression test for issue #115351, where a recursion limit of 0 caused an ICE.
-// compile-flags: -Ztrait-solver=next --crate-type=lib
+// compile-flags: -Znext-solver --crate-type=lib
// check-fail
#![recursion_limit = "0"]
diff --git a/tests/ui/traits/new-solver/overflow/recursion-limit-zero-issue-115351.stderr b/tests/ui/traits/next-solver/overflow/recursion-limit-zero-issue-115351.stderr
index 16b25d90a..16b25d90a 100644
--- a/tests/ui/traits/new-solver/overflow/recursion-limit-zero-issue-115351.stderr
+++ b/tests/ui/traits/next-solver/overflow/recursion-limit-zero-issue-115351.stderr
diff --git a/tests/ui/traits/new-solver/overflow/recursive-self-normalization-2.rs b/tests/ui/traits/next-solver/overflow/recursive-self-normalization-2.rs
index d086db475..327ef865d 100644
--- a/tests/ui/traits/new-solver/overflow/recursive-self-normalization-2.rs
+++ b/tests/ui/traits/next-solver/overflow/recursive-self-normalization-2.rs
@@ -1,5 +1,4 @@
-//~ ERROR overflow
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
trait Foo1 {
type Assoc1;
@@ -15,6 +14,7 @@ fn needs_bar<S: Bar>() {}
fn test<T: Foo1<Assoc1 = <T as Foo2>::Assoc2> + Foo2<Assoc2 = <T as Foo1>::Assoc1>>() {
needs_bar::<T::Assoc1>();
//~^ ERROR overflow evaluating the requirement `<T as Foo1>::Assoc1: Bar`
+ //~| ERROR overflow evaluating the requirement `<T as Foo2>::Assoc2`
}
fn main() {}
diff --git a/tests/ui/traits/new-solver/overflow/recursive-self-normalization-2.stderr b/tests/ui/traits/next-solver/overflow/recursive-self-normalization-2.stderr
index 1dc63fae9..eda62b99c 100644
--- a/tests/ui/traits/new-solver/overflow/recursive-self-normalization-2.stderr
+++ b/tests/ui/traits/next-solver/overflow/recursive-self-normalization-2.stderr
@@ -1,17 +1,21 @@
error[E0275]: overflow evaluating the requirement `<T as Foo1>::Assoc1: Bar`
- --> $DIR/recursive-self-normalization-2.rs:16:17
+ --> $DIR/recursive-self-normalization-2.rs:15:17
|
LL | needs_bar::<T::Assoc1>();
| ^^^^^^^^^
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`recursive_self_normalization_2`)
note: required by a bound in `needs_bar`
- --> $DIR/recursive-self-normalization-2.rs:13:17
+ --> $DIR/recursive-self-normalization-2.rs:12:17
|
LL | fn needs_bar<S: Bar>() {}
| ^^^ required by this bound in `needs_bar`
error[E0275]: overflow evaluating the requirement `<T as Foo2>::Assoc2`
+ --> $DIR/recursive-self-normalization-2.rs:15:5
+ |
+LL | needs_bar::<T::Assoc1>();
+ | ^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`recursive_self_normalization_2`)
diff --git a/tests/ui/traits/next-solver/overflow/recursive-self-normalization.rs b/tests/ui/traits/next-solver/overflow/recursive-self-normalization.rs
new file mode 100644
index 000000000..f45d208e6
--- /dev/null
+++ b/tests/ui/traits/next-solver/overflow/recursive-self-normalization.rs
@@ -0,0 +1,16 @@
+// compile-flags: -Znext-solver
+
+trait Foo {
+ type Assoc;
+}
+
+trait Bar {}
+fn needs_bar<S: Bar>() {}
+
+fn test<T: Foo<Assoc = <T as Foo>::Assoc>>() {
+ needs_bar::<T::Assoc>();
+ //~^ ERROR overflow evaluating the requirement `<T as Foo>::Assoc: Bar`
+ //~| ERROR overflow evaluating the requirement `<T as Foo>::Assoc` [E0275]
+}
+
+fn main() {}
diff --git a/tests/ui/traits/new-solver/overflow/recursive-self-normalization.stderr b/tests/ui/traits/next-solver/overflow/recursive-self-normalization.stderr
index afc5bfa54..b0a0a6976 100644
--- a/tests/ui/traits/new-solver/overflow/recursive-self-normalization.stderr
+++ b/tests/ui/traits/next-solver/overflow/recursive-self-normalization.stderr
@@ -1,17 +1,21 @@
error[E0275]: overflow evaluating the requirement `<T as Foo>::Assoc: Bar`
- --> $DIR/recursive-self-normalization.rs:12:17
+ --> $DIR/recursive-self-normalization.rs:11:17
|
LL | needs_bar::<T::Assoc>();
| ^^^^^^^^
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`recursive_self_normalization`)
note: required by a bound in `needs_bar`
- --> $DIR/recursive-self-normalization.rs:9:17
+ --> $DIR/recursive-self-normalization.rs:8:17
|
LL | fn needs_bar<S: Bar>() {}
| ^^^ required by this bound in `needs_bar`
error[E0275]: overflow evaluating the requirement `<T as Foo>::Assoc`
+ --> $DIR/recursive-self-normalization.rs:11:5
+ |
+LL | needs_bar::<T::Assoc>();
+ | ^^^^^^^^^^^^^^^^^^^^^
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`recursive_self_normalization`)
diff --git a/tests/ui/traits/new-solver/param-candidate-doesnt-shadow-project.rs b/tests/ui/traits/next-solver/param-candidate-doesnt-shadow-project.rs
index bdf999ec5..f67b073c5 100644
--- a/tests/ui/traits/new-solver/param-candidate-doesnt-shadow-project.rs
+++ b/tests/ui/traits/next-solver/param-candidate-doesnt-shadow-project.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
trait Foo {
diff --git a/tests/ui/traits/next-solver/param-discr-kind.rs b/tests/ui/traits/next-solver/param-discr-kind.rs
new file mode 100644
index 000000000..c66b0b9f4
--- /dev/null
+++ b/tests/ui/traits/next-solver/param-discr-kind.rs
@@ -0,0 +1,8 @@
+// compile-flags: -Znext-solver
+// check-pass
+
+fn foo<T>(x: T) {
+ std::mem::discriminant(&x);
+}
+
+fn main() {}
diff --git a/tests/ui/traits/new-solver/pointee.rs b/tests/ui/traits/next-solver/pointee.rs
index 93c0542ac..a56df549a 100644
--- a/tests/ui/traits/new-solver/pointee.rs
+++ b/tests/ui/traits/next-solver/pointee.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
#![feature(ptr_metadata)]
diff --git a/tests/ui/traits/new-solver/pointer-like.rs b/tests/ui/traits/next-solver/pointer-like.rs
index 986301769..f6cc718c6 100644
--- a/tests/ui/traits/new-solver/pointer-like.rs
+++ b/tests/ui/traits/next-solver/pointer-like.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
#![feature(pointer_like_trait)]
diff --git a/tests/ui/traits/new-solver/pointer-like.stderr b/tests/ui/traits/next-solver/pointer-like.stderr
index 215a81cc2..4b624fd0d 100644
--- a/tests/ui/traits/new-solver/pointer-like.stderr
+++ b/tests/ui/traits/next-solver/pointer-like.stderr
@@ -19,6 +19,6 @@ LL | require_(&1u16);
LL | require_(&mut 1u16);
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/new-solver/prefer-candidate-no-constraints.rs b/tests/ui/traits/next-solver/prefer-candidate-no-constraints.rs
index 6f8164f3a..a47f819f1 100644
--- a/tests/ui/traits/new-solver/prefer-candidate-no-constraints.rs
+++ b/tests/ui/traits/next-solver/prefer-candidate-no-constraints.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
trait Foo {}
diff --git a/tests/ui/traits/new-solver/prefer-param-env-on-ambiguity.rs b/tests/ui/traits/next-solver/prefer-param-env-on-ambiguity.rs
index 909b33ec3..f8c0223e1 100644
--- a/tests/ui/traits/new-solver/prefer-param-env-on-ambiguity.rs
+++ b/tests/ui/traits/next-solver/prefer-param-env-on-ambiguity.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
trait Foo<'a> {}
diff --git a/tests/ui/traits/new-solver/projection-discr-kind.rs b/tests/ui/traits/next-solver/projection-discr-kind.rs
index 20296b287..bf557f863 100644
--- a/tests/ui/traits/new-solver/projection-discr-kind.rs
+++ b/tests/ui/traits/next-solver/projection-discr-kind.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// Check that `<T::Assoc as DiscriminantKind>::Discriminant` doesn't normalize
// to itself and cause overflow/ambiguity.
diff --git a/tests/ui/traits/new-solver/projection-discr-kind.stderr b/tests/ui/traits/next-solver/projection-discr-kind.stderr
index e14953f19..69999c755 100644
--- a/tests/ui/traits/new-solver/projection-discr-kind.stderr
+++ b/tests/ui/traits/next-solver/projection-discr-kind.stderr
@@ -17,6 +17,6 @@ note: required by a bound in `needs_bar`
LL | fn needs_bar(_: impl Bar) {}
| ^^^ required by this bound in `needs_bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/next-solver/projection/param-env-trait-candidate-1.rs b/tests/ui/traits/next-solver/projection/param-env-trait-candidate-1.rs
new file mode 100644
index 000000000..b337c0673
--- /dev/null
+++ b/tests/ui/traits/next-solver/projection/param-env-trait-candidate-1.rs
@@ -0,0 +1,14 @@
+// check-pass
+// compile-flags: -Znext-solver
+
+// See https://github.com/rust-lang/trait-system-refactor-initiative/issues/1
+// a minimization of a pattern in core.
+fn next<T: Iterator<Item = U>, U>(t: &mut T) -> Option<U> {
+ t.next()
+}
+
+fn foo<T: Iterator>(t: &mut T) {
+ let _: Option<T::Item> = next(t);
+}
+
+fn main() {}
diff --git a/tests/ui/traits/next-solver/projection/param-env-trait-candidate-2.rs b/tests/ui/traits/next-solver/projection/param-env-trait-candidate-2.rs
new file mode 100644
index 000000000..db8dc1eb9
--- /dev/null
+++ b/tests/ui/traits/next-solver/projection/param-env-trait-candidate-2.rs
@@ -0,0 +1,29 @@
+// check-pass
+// compile-flags: -Znext-solver
+
+// See https://github.com/rust-lang/trait-system-refactor-initiative/issues/1,
+// a minimization of a pattern in core.
+
+trait Iterator {
+ type Item;
+}
+
+struct Flatten<I>(I);
+
+impl<I, U> Iterator for Flatten<I>
+where
+ I: Iterator<Item = U>,
+{
+ type Item = U;
+}
+
+fn needs_iterator<I: Iterator>() {}
+
+fn environment<J>()
+where
+ J: Iterator,
+{
+ needs_iterator::<Flatten<J>>();
+}
+
+fn main() {}
diff --git a/tests/ui/traits/new-solver/slice-match-byte-lit.rs b/tests/ui/traits/next-solver/slice-match-byte-lit.rs
index 4f8480625..1edc9f1e8 100644
--- a/tests/ui/traits/new-solver/slice-match-byte-lit.rs
+++ b/tests/ui/traits/next-solver/slice-match-byte-lit.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
fn test(s: &[u8]) {
diff --git a/tests/ui/traits/new-solver/specialization-transmute.rs b/tests/ui/traits/next-solver/specialization-transmute.rs
index fac7d76f8..58b62f52d 100644
--- a/tests/ui/traits/new-solver/specialization-transmute.rs
+++ b/tests/ui/traits/next-solver/specialization-transmute.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
#![feature(specialization)]
//~^ WARN the feature `specialization` is incomplete
diff --git a/tests/ui/traits/new-solver/specialization-transmute.stderr b/tests/ui/traits/next-solver/specialization-transmute.stderr
index 18965a465..eaf32a475 100644
--- a/tests/ui/traits/new-solver/specialization-transmute.stderr
+++ b/tests/ui/traits/next-solver/specialization-transmute.stderr
@@ -8,13 +8,11 @@ LL | #![feature(specialization)]
= help: consider using `min_specialization` instead, which is more stable and complete
= note: `#[warn(incomplete_features)]` on by default
-error[E0284]: type annotations needed
+error[E0284]: type annotations needed: cannot satisfy `<T as Default>::Id normalizes-to _`
--> $DIR/specialization-transmute.rs:15:23
|
LL | fn intu(&self) -> &Self::Id {
- | ^^^^^^^^^ cannot infer type
- |
- = note: cannot satisfy `<T as Default>::Id == _`
+ | ^^^^^^^^^ cannot satisfy `<T as Default>::Id normalizes-to _`
error[E0282]: type annotations needed
--> $DIR/specialization-transmute.rs:13:23
diff --git a/tests/ui/traits/new-solver/specialization-unconstrained.rs b/tests/ui/traits/next-solver/specialization-unconstrained.rs
index 7fd753109..950fb1512 100644
--- a/tests/ui/traits/new-solver/specialization-unconstrained.rs
+++ b/tests/ui/traits/next-solver/specialization-unconstrained.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
#![feature(specialization)]
//~^ WARN the feature `specialization` is incomplete
diff --git a/tests/ui/traits/new-solver/specialization-unconstrained.stderr b/tests/ui/traits/next-solver/specialization-unconstrained.stderr
index ed4dafa14..ed4dafa14 100644
--- a/tests/ui/traits/new-solver/specialization-unconstrained.stderr
+++ b/tests/ui/traits/next-solver/specialization-unconstrained.stderr
diff --git a/tests/ui/traits/new-solver/stall-num-var-auto-trait.fallback.stderr b/tests/ui/traits/next-solver/stall-num-var-auto-trait.fallback.stderr
index a3ab7836c..2e3c22c8d 100644
--- a/tests/ui/traits/new-solver/stall-num-var-auto-trait.fallback.stderr
+++ b/tests/ui/traits/next-solver/stall-num-var-auto-trait.fallback.stderr
@@ -12,6 +12,6 @@ note: required by a bound in `needs_foo`
LL | fn needs_foo(x: impl Foo) {}
| ^^^ required by this bound in `needs_foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/new-solver/stall-num-var-auto-trait.rs b/tests/ui/traits/next-solver/stall-num-var-auto-trait.rs
index 0539c3a42..f5bf985cd 100644
--- a/tests/ui/traits/new-solver/stall-num-var-auto-trait.rs
+++ b/tests/ui/traits/next-solver/stall-num-var-auto-trait.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// revisions: fallback constrain
//[constrain] check-pass
diff --git a/tests/ui/traits/new-solver/structural-resolve-field.rs b/tests/ui/traits/next-solver/structural-resolve-field.rs
index 01899c9ad..b247e2375 100644
--- a/tests/ui/traits/new-solver/structural-resolve-field.rs
+++ b/tests/ui/traits/next-solver/structural-resolve-field.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
#[derive(Default)]
diff --git a/tests/ui/traits/new-solver/tait-eq-proj-2.rs b/tests/ui/traits/next-solver/tait-eq-proj-2.rs
index 77ea8bc24..a3df053dd 100644
--- a/tests/ui/traits/new-solver/tait-eq-proj-2.rs
+++ b/tests/ui/traits/next-solver/tait-eq-proj-2.rs
@@ -1,9 +1,9 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
#![feature(type_alias_impl_trait)]
-// Similar to tests/ui/traits/new-solver/tait-eq-proj.rs
+// Similar to tests/ui/traits/next-solver/tait-eq-proj.rs
// but check the alias-sub relation in the other direction.
type Tait = impl Iterator<Item = impl Sized>;
diff --git a/tests/ui/traits/new-solver/tait-eq-proj.rs b/tests/ui/traits/next-solver/tait-eq-proj.rs
index 01ef2ec95..871e8e1e9 100644
--- a/tests/ui/traits/new-solver/tait-eq-proj.rs
+++ b/tests/ui/traits/next-solver/tait-eq-proj.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
#![feature(type_alias_impl_trait)]
diff --git a/tests/ui/traits/new-solver/tait-eq-tait.rs b/tests/ui/traits/next-solver/tait-eq-tait.rs
index 70d9dc0ea..2629a124c 100644
--- a/tests/ui/traits/new-solver/tait-eq-tait.rs
+++ b/tests/ui/traits/next-solver/tait-eq-tait.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
// Not exactly sure if this is the inference behavior we *want*,
diff --git a/tests/ui/traits/new-solver/temporary-ambiguity.rs b/tests/ui/traits/next-solver/temporary-ambiguity.rs
index c6c11a1a1..6102de7e4 100644
--- a/tests/ui/traits/new-solver/temporary-ambiguity.rs
+++ b/tests/ui/traits/next-solver/temporary-ambiguity.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
// Checks that we don't explode when we assemble >1 candidate for a goal.
diff --git a/tests/ui/traits/new-solver/trait-upcast-lhs-needs-normalization.rs b/tests/ui/traits/next-solver/trait-upcast-lhs-needs-normalization.rs
index 43cd773bf..8e0378e94 100644
--- a/tests/ui/traits/new-solver/trait-upcast-lhs-needs-normalization.rs
+++ b/tests/ui/traits/next-solver/trait-upcast-lhs-needs-normalization.rs
@@ -1,6 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
-
+// compile-flags: -Znext-solver
#![feature(trait_upcasting)]
pub trait A {}
diff --git a/tests/ui/traits/new-solver/try-example.rs b/tests/ui/traits/next-solver/try-example.rs
index e826f3a00..92b0b5978 100644
--- a/tests/ui/traits/new-solver/try-example.rs
+++ b/tests/ui/traits/next-solver/try-example.rs
@@ -1,5 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
use std::error::Error;
diff --git a/tests/ui/traits/new-solver/two-projection-param-candidates-are-ambiguous.rs b/tests/ui/traits/next-solver/two-projection-param-candidates-are-ambiguous.rs
index 3c7fc0d81..d25e372b5 100644
--- a/tests/ui/traits/new-solver/two-projection-param-candidates-are-ambiguous.rs
+++ b/tests/ui/traits/next-solver/two-projection-param-candidates-are-ambiguous.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// When we're solving `<T as Foo>::Assoc = i32`, we actually first solve
// `<T as Foo>::Assoc = ?1t`, then unify `?1t` with `i32`. That goal
diff --git a/tests/ui/traits/new-solver/two-projection-param-candidates-are-ambiguous.stderr b/tests/ui/traits/next-solver/two-projection-param-candidates-are-ambiguous.stderr
index b311ac6b5..dfff9f11b 100644
--- a/tests/ui/traits/new-solver/two-projection-param-candidates-are-ambiguous.stderr
+++ b/tests/ui/traits/next-solver/two-projection-param-candidates-are-ambiguous.stderr
@@ -12,6 +12,6 @@ note: required by a bound in `needs_bar`
LL | fn needs_bar<T: Bar>() {}
| ^^^ required by this bound in `needs_bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/traits/new-solver/unevaluated-const-impl-trait-ref.fails.stderr b/tests/ui/traits/next-solver/unevaluated-const-impl-trait-ref.fails.stderr
index 072ac32a5..4be90c702 100644
--- a/tests/ui/traits/new-solver/unevaluated-const-impl-trait-ref.fails.stderr
+++ b/tests/ui/traits/next-solver/unevaluated-const-impl-trait-ref.fails.stderr
@@ -13,6 +13,6 @@ note: required by a bound in `needs`
LL | fn needs<const N: usize>() where (): Trait<N> {}
| ^^^^^^^^ required by this bound in `needs`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/new-solver/unevaluated-const-impl-trait-ref.rs b/tests/ui/traits/next-solver/unevaluated-const-impl-trait-ref.rs
index 26c595bc9..77a169d48 100644
--- a/tests/ui/traits/new-solver/unevaluated-const-impl-trait-ref.rs
+++ b/tests/ui/traits/next-solver/unevaluated-const-impl-trait-ref.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// revisions: works fails
//[works] check-pass
diff --git a/tests/ui/traits/next-solver/unsafe-auto-trait-impl.rs b/tests/ui/traits/next-solver/unsafe-auto-trait-impl.rs
new file mode 100644
index 000000000..f66bf0b87
--- /dev/null
+++ b/tests/ui/traits/next-solver/unsafe-auto-trait-impl.rs
@@ -0,0 +1,8 @@
+// compile-flags: -Znext-solver
+// check-pass
+
+struct Foo(*mut ());
+
+unsafe impl Sync for Foo {}
+
+fn main() {}
diff --git a/tests/ui/traits/new-solver/unsize-although-ambiguous.rs b/tests/ui/traits/next-solver/unsize-although-ambiguous.rs
index 431988a5f..8217701b9 100644
--- a/tests/ui/traits/new-solver/unsize-although-ambiguous.rs
+++ b/tests/ui/traits/next-solver/unsize-although-ambiguous.rs
@@ -1,5 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
use std::fmt::Display;
diff --git a/tests/ui/traits/new-solver/unsize-good.rs b/tests/ui/traits/next-solver/unsize-good.rs
index 87ed9cfd1..04ebe66f2 100644
--- a/tests/ui/traits/new-solver/unsize-good.rs
+++ b/tests/ui/traits/next-solver/unsize-good.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
#![feature(unsized_tuple_coercion)]
diff --git a/tests/ui/traits/new-solver/upcast-right-substs.rs b/tests/ui/traits/next-solver/upcast-right-substs.rs
index c19c82acf..5b4f6d4be 100644
--- a/tests/ui/traits/new-solver/upcast-right-substs.rs
+++ b/tests/ui/traits/next-solver/upcast-right-substs.rs
@@ -1,6 +1,5 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
-
#![feature(trait_upcasting)]
trait Foo: Bar<i32> + Bar<u32> {}
diff --git a/tests/ui/traits/next-solver/upcast-wrong-substs.rs b/tests/ui/traits/next-solver/upcast-wrong-substs.rs
new file mode 100644
index 000000000..0cd253007
--- /dev/null
+++ b/tests/ui/traits/next-solver/upcast-wrong-substs.rs
@@ -0,0 +1,11 @@
+// compile-flags: -Znext-solver
+
+trait Foo: Bar<i32> + Bar<u32> {}
+
+trait Bar<T> {}
+
+fn main() {
+ let x: &dyn Foo = todo!();
+ let y: &dyn Bar<usize> = x;
+ //~^ ERROR mismatched types
+}
diff --git a/tests/ui/traits/new-solver/upcast-wrong-substs.stderr b/tests/ui/traits/next-solver/upcast-wrong-substs.stderr
index 8623f395f..00ba1ef67 100644
--- a/tests/ui/traits/new-solver/upcast-wrong-substs.stderr
+++ b/tests/ui/traits/next-solver/upcast-wrong-substs.stderr
@@ -1,5 +1,5 @@
error[E0308]: mismatched types
- --> $DIR/upcast-wrong-substs.rs:11:30
+ --> $DIR/upcast-wrong-substs.rs:9:30
|
LL | let y: &dyn Bar<usize> = x;
| --------------- ^ expected trait `Bar`, found trait `Foo`
@@ -9,6 +9,6 @@ LL | let y: &dyn Bar<usize> = x;
= note: expected reference `&dyn Bar<usize>`
found reference `&dyn Foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/traits/new-solver/winnow-specializing-impls.rs b/tests/ui/traits/next-solver/winnow-specializing-impls.rs
index 06f64de74..d70a91596 100644
--- a/tests/ui/traits/new-solver/winnow-specializing-impls.rs
+++ b/tests/ui/traits/next-solver/winnow-specializing-impls.rs
@@ -1,5 +1,5 @@
// build-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// Tests that the specializing impl `<() as Foo>` holds during codegen.