summaryrefslogtreecommitdiffstats
path: root/tests/ui/coherence
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/coherence')
-rw-r--r--tests/ui/coherence/coherence-all-remote.stderr2
-rw-r--r--tests/ui/coherence/coherence-bigint-param.stderr2
-rw-r--r--tests/ui/coherence/coherence-blanket-conflicts-with-blanket-implemented.stderr2
-rw-r--r--tests/ui/coherence/coherence-blanket-conflicts-with-blanket-unimplemented.stderr2
-rw-r--r--tests/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.stderr2
-rw-r--r--tests/ui/coherence/coherence-blanket-conflicts-with-specific-multidispatch.stderr2
-rw-r--r--tests/ui/coherence/coherence-blanket-conflicts-with-specific-trait.stderr2
-rw-r--r--tests/ui/coherence/coherence-blanket-conflicts-with-specific.stderr2
-rw-r--r--tests/ui/coherence/coherence-cow.re_a.stderr2
-rw-r--r--tests/ui/coherence/coherence-cow.re_b.stderr2
-rw-r--r--tests/ui/coherence/coherence-cow.re_c.stderr2
-rw-r--r--tests/ui/coherence/coherence-cross-crate-conflict.stderr2
-rw-r--r--tests/ui/coherence/coherence-error-suppression.stderr2
-rw-r--r--tests/ui/coherence/coherence-fn-covariant-bound-vs-static.stderr2
-rw-r--r--tests/ui/coherence/coherence-fn-implied-bounds.stderr2
-rw-r--r--tests/ui/coherence/coherence-fn-inputs.stderr2
-rw-r--r--tests/ui/coherence/coherence-free-vs-bound-region.stderr2
-rw-r--r--tests/ui/coherence/coherence-fundamental-trait-objects.stderr2
-rw-r--r--tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr2
-rw-r--r--tests/ui/coherence/coherence-inherited-subtyping.stderr2
-rw-r--r--tests/ui/coherence/coherence-lone-type-parameter.stderr2
-rw-r--r--tests/ui/coherence/coherence-negative-impls-safe-rpass.rs2
-rw-r--r--tests/ui/coherence/coherence-negative-impls-safe.stderr2
-rw-r--r--tests/ui/coherence/coherence-negative-outlives-lifetimes.rs4
-rw-r--r--tests/ui/coherence/coherence-negative-outlives-lifetimes.stock.stderr4
-rw-r--r--tests/ui/coherence/coherence-negative-outlives-lifetimes.with_negative_coherence.stderr4
-rw-r--r--tests/ui/coherence/coherence-no-direct-lifetime-dispatch.stderr2
-rw-r--r--tests/ui/coherence/coherence-overlap-all-t-and-tuple.stderr2
-rw-r--r--tests/ui/coherence/coherence-overlap-downstream-inherent.rs2
-rw-r--r--tests/ui/coherence/coherence-overlap-downstream.rs2
-rw-r--r--tests/ui/coherence/coherence-overlap-issue-23516-inherent.next.stderr2
-rw-r--r--tests/ui/coherence/coherence-overlap-issue-23516-inherent.old.stderr2
-rw-r--r--tests/ui/coherence/coherence-overlap-issue-23516-inherent.rs2
-rw-r--r--tests/ui/coherence/coherence-overlap-issue-23516.next.stderr2
-rw-r--r--tests/ui/coherence/coherence-overlap-issue-23516.old.stderr2
-rw-r--r--tests/ui/coherence/coherence-overlap-issue-23516.rs2
-rw-r--r--tests/ui/coherence/coherence-overlap-negate-not-use-feature-gate.stderr2
-rw-r--r--tests/ui/coherence/coherence-overlap-trait-alias.stderr2
-rw-r--r--tests/ui/coherence/coherence-overlap-upstream-inherent.stderr2
-rw-r--r--tests/ui/coherence/coherence-overlap-upstream.stderr2
-rw-r--r--tests/ui/coherence/coherence-overlap-with-regions.rs8
-rw-r--r--tests/ui/coherence/coherence-overlap-with-regions.stderr11
-rw-r--r--tests/ui/coherence/coherence-overlapping-pairs.stderr2
-rw-r--r--tests/ui/coherence/coherence-pair-covered-uncovered-1.stderr2
-rw-r--r--tests/ui/coherence/coherence-pair-covered-uncovered.stderr2
-rw-r--r--tests/ui/coherence/coherence-projection-conflict-orphan.stderr2
-rw-r--r--tests/ui/coherence/coherence-projection-conflict-ty-param.stderr2
-rw-r--r--tests/ui/coherence/coherence-projection-conflict.stderr2
-rw-r--r--tests/ui/coherence/coherence-tuple-conflict.stderr2
-rw-r--r--tests/ui/coherence/coherence-unsafe-trait-object-impl.stderr2
-rw-r--r--tests/ui/coherence/coherence-vec-local-2.stderr2
-rw-r--r--tests/ui/coherence/coherence-vec-local.stderr2
-rw-r--r--tests/ui/coherence/coherence-wasm-bindgen.stderr2
-rw-r--r--tests/ui/coherence/coherence-where-clause.rs2
-rw-r--r--tests/ui/coherence/coherence-with-closure.stderr2
-rw-r--r--tests/ui/coherence/coherence-with-coroutine.stock.stderr2
-rw-r--r--tests/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.stderr2
-rw-r--r--tests/ui/coherence/coherence_copy_like_err_struct.stderr2
-rw-r--r--tests/ui/coherence/coherence_copy_like_err_tuple.stderr2
-rw-r--r--tests/ui/coherence/coherence_inherent.stderr2
-rw-r--r--tests/ui/coherence/coherence_inherent_cc.stderr2
-rw-r--r--tests/ui/coherence/coherence_local_err_struct.stderr2
-rw-r--r--tests/ui/coherence/coherence_local_err_tuple.stderr2
-rw-r--r--tests/ui/coherence/deep-bad-copy-reason.stderr2
-rw-r--r--tests/ui/coherence/illegal-copy-bad-projection.stderr2
-rw-r--r--tests/ui/coherence/impl-foreign-for-foreign.stderr2
-rw-r--r--tests/ui/coherence/impl-foreign[foreign]-for-foreign.stderr2
-rw-r--r--tests/ui/coherence/impl[t]-foreign-for-fundamental[t].stderr2
-rw-r--r--tests/ui/coherence/impl[t]-foreign[foreign]-for-t.stderr2
-rw-r--r--tests/ui/coherence/impl[t]-foreign[local]-for-t.stderr2
-rw-r--r--tests/ui/coherence/impl[t]-foreign[t]-for-foreign.stderr2
-rw-r--r--tests/ui/coherence/impl[t]-foreign[t]-for-t.stderr2
-rw-r--r--tests/ui/coherence/inter-crate-ambiguity-causes-notes.next.stderr2
-rw-r--r--tests/ui/coherence/inter-crate-ambiguity-causes-notes.old.stderr2
-rw-r--r--tests/ui/coherence/inter-crate-ambiguity-causes-notes.rs2
-rw-r--r--tests/ui/coherence/negative-coherence-check-placeholder-outlives.rs14
-rw-r--r--tests/ui/coherence/negative-coherence-check-placeholder-outlives.stderr (renamed from tests/ui/coherence/negative-coherence-considering-regions.static_lt.stderr)11
-rw-r--r--tests/ui/coherence/negative-coherence-considering-regions.any_lt.stderr4
-rw-r--r--tests/ui/coherence/negative-coherence-considering-regions.rs8
-rw-r--r--tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.explicit.stderr19
-rw-r--r--tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.rs25
-rw-r--r--tests/ui/coherence/normalize-for-errors.current.stderr14
-rw-r--r--tests/ui/coherence/normalize-for-errors.next.stderr14
-rw-r--r--tests/ui/coherence/normalize-for-errors.rs21
-rw-r--r--tests/ui/coherence/occurs-check/associated-type.next.stderr25
-rw-r--r--tests/ui/coherence/occurs-check/associated-type.old.stderr25
-rw-r--r--tests/ui/coherence/occurs-check/associated-type.rs45
-rw-r--r--tests/ui/coherence/occurs-check/opaques.next.stderr12
-rw-r--r--tests/ui/coherence/occurs-check/opaques.rs37
-rw-r--r--tests/ui/coherence/strict-coherence-needs-negative-coherence.stderr2
-rw-r--r--tests/ui/coherence/warn-when-cycle-is-error-in-coherence.stderr2
91 files changed, 338 insertions, 111 deletions
diff --git a/tests/ui/coherence/coherence-all-remote.stderr b/tests/ui/coherence/coherence-all-remote.stderr
index 7eca41753..0cf9f87b4 100644
--- a/tests/ui/coherence/coherence-all-remote.stderr
+++ b/tests/ui/coherence/coherence-all-remote.stderr
@@ -7,6 +7,6 @@ LL | impl<T> Remote1<T> for isize { }
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
= note: only traits defined in the current crate can be implemented for a type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0210`.
diff --git a/tests/ui/coherence/coherence-bigint-param.stderr b/tests/ui/coherence/coherence-bigint-param.stderr
index e8d74c917..e6c77624a 100644
--- a/tests/ui/coherence/coherence-bigint-param.stderr
+++ b/tests/ui/coherence/coherence-bigint-param.stderr
@@ -7,6 +7,6 @@ LL | impl<T> Remote1<BigInt> for T { }
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type
= note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait<T1, ..., Tn> for T0`, where `T0` is the first and `Tn` is the last
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0210`.
diff --git a/tests/ui/coherence/coherence-blanket-conflicts-with-blanket-implemented.stderr b/tests/ui/coherence/coherence-blanket-conflicts-with-blanket-implemented.stderr
index 9156972a1..3618fe841 100644
--- a/tests/ui/coherence/coherence-blanket-conflicts-with-blanket-implemented.stderr
+++ b/tests/ui/coherence/coherence-blanket-conflicts-with-blanket-implemented.stderr
@@ -7,6 +7,6 @@ LL | impl<T:Even> MyTrait for T {
LL | impl<T:Odd> MyTrait for T {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
-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/coherence/coherence-blanket-conflicts-with-blanket-unimplemented.stderr b/tests/ui/coherence/coherence-blanket-conflicts-with-blanket-unimplemented.stderr
index 8400968e1..510480f6a 100644
--- a/tests/ui/coherence/coherence-blanket-conflicts-with-blanket-unimplemented.stderr
+++ b/tests/ui/coherence/coherence-blanket-conflicts-with-blanket-unimplemented.stderr
@@ -7,6 +7,6 @@ LL | impl<T:Even> MyTrait for T {
LL | impl<T:Odd> MyTrait for T {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
-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/coherence/coherence-blanket-conflicts-with-specific-cross-crate.stderr b/tests/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.stderr
index 4d7872598..4b86cffbe 100644
--- a/tests/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.stderr
+++ b/tests/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.stderr
@@ -8,6 +8,6 @@ LL | impl GoMut for MyThingy {
- impl<G> GoMut for G
where G: Go;
-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/coherence/coherence-blanket-conflicts-with-specific-multidispatch.stderr b/tests/ui/coherence/coherence-blanket-conflicts-with-specific-multidispatch.stderr
index c2a925213..ddb7474c2 100644
--- a/tests/ui/coherence/coherence-blanket-conflicts-with-specific-multidispatch.stderr
+++ b/tests/ui/coherence/coherence-blanket-conflicts-with-specific-multidispatch.stderr
@@ -7,6 +7,6 @@ LL | impl<T> MyTrait<T> for T {
LL | impl MyTrait<MyType> for MyType {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `MyType`
-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/coherence/coherence-blanket-conflicts-with-specific-trait.stderr b/tests/ui/coherence/coherence-blanket-conflicts-with-specific-trait.stderr
index e1a5dffeb..b68128534 100644
--- a/tests/ui/coherence/coherence-blanket-conflicts-with-specific-trait.stderr
+++ b/tests/ui/coherence/coherence-blanket-conflicts-with-specific-trait.stderr
@@ -7,6 +7,6 @@ LL | impl<T:OtherTrait> MyTrait for T {
LL | impl MyTrait for MyType {
| ^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `MyType`
-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/coherence/coherence-blanket-conflicts-with-specific.stderr b/tests/ui/coherence/coherence-blanket-conflicts-with-specific.stderr
index ba60a2ea9..164edff4a 100644
--- a/tests/ui/coherence/coherence-blanket-conflicts-with-specific.stderr
+++ b/tests/ui/coherence/coherence-blanket-conflicts-with-specific.stderr
@@ -7,6 +7,6 @@ LL | impl<T> MyTrait for T {
LL | impl MyTrait for MyType {
| ^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `MyType`
-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/coherence/coherence-cow.re_a.stderr b/tests/ui/coherence/coherence-cow.re_a.stderr
index fe4b5b410..0bc017817 100644
--- a/tests/ui/coherence/coherence-cow.re_a.stderr
+++ b/tests/ui/coherence/coherence-cow.re_a.stderr
@@ -9,6 +9,6 @@ LL | impl<T> Remote for Pair<T,Cover<T>> { }
|
= note: define and implement a trait or new type instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0117`.
diff --git a/tests/ui/coherence/coherence-cow.re_b.stderr b/tests/ui/coherence/coherence-cow.re_b.stderr
index da4ede325..9bdb49dcc 100644
--- a/tests/ui/coherence/coherence-cow.re_b.stderr
+++ b/tests/ui/coherence/coherence-cow.re_b.stderr
@@ -9,6 +9,6 @@ LL | impl<T> Remote for Pair<Cover<T>,T> { }
|
= note: define and implement a trait or new type instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0117`.
diff --git a/tests/ui/coherence/coherence-cow.re_c.stderr b/tests/ui/coherence/coherence-cow.re_c.stderr
index d1a20c0ca..dfff2667e 100644
--- a/tests/ui/coherence/coherence-cow.re_c.stderr
+++ b/tests/ui/coherence/coherence-cow.re_c.stderr
@@ -9,6 +9,6 @@ LL | impl<T,U> Remote for Pair<Cover<T>,U> { }
|
= note: define and implement a trait or new type instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0117`.
diff --git a/tests/ui/coherence/coherence-cross-crate-conflict.stderr b/tests/ui/coherence/coherence-cross-crate-conflict.stderr
index 3d253d56a..812ce9772 100644
--- a/tests/ui/coherence/coherence-cross-crate-conflict.stderr
+++ b/tests/ui/coherence/coherence-cross-crate-conflict.stderr
@@ -7,6 +7,6 @@ LL | impl<A> Foo for A {
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
= note: only traits defined in the current crate can be implemented for a type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0210`.
diff --git a/tests/ui/coherence/coherence-error-suppression.stderr b/tests/ui/coherence/coherence-error-suppression.stderr
index aadc80cb1..fcaa510c6 100644
--- a/tests/ui/coherence/coherence-error-suppression.stderr
+++ b/tests/ui/coherence/coherence-error-suppression.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `DoesNotExist` in this scope
LL | impl Foo for DoesNotExist {}
| ^^^^^^^^^^^^ 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/coherence/coherence-fn-covariant-bound-vs-static.stderr b/tests/ui/coherence/coherence-fn-covariant-bound-vs-static.stderr
index 7dabd97b9..316da26b5 100644
--- a/tests/ui/coherence/coherence-fn-covariant-bound-vs-static.stderr
+++ b/tests/ui/coherence/coherence-fn-covariant-bound-vs-static.stderr
@@ -8,6 +8,6 @@ LL | impl<'a> Trait for fn(fn(&'a ())) {}
|
= note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
-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/coherence/coherence-fn-implied-bounds.stderr b/tests/ui/coherence/coherence-fn-implied-bounds.stderr
index 201871204..b0dea7467 100644
--- a/tests/ui/coherence/coherence-fn-implied-bounds.stderr
+++ b/tests/ui/coherence/coherence-fn-implied-bounds.stderr
@@ -16,5 +16,5 @@ note: the lint level is defined here
LL | #![deny(coherence_leak_check)]
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/coherence/coherence-fn-inputs.stderr b/tests/ui/coherence/coherence-fn-inputs.stderr
index 82bd8a35f..246ec5947 100644
--- a/tests/ui/coherence/coherence-fn-inputs.stderr
+++ b/tests/ui/coherence/coherence-fn-inputs.stderr
@@ -8,6 +8,6 @@ LL | impl Trait for for<'c> fn(&'c u32, &'c u32) {
|
= note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
-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/coherence/coherence-free-vs-bound-region.stderr b/tests/ui/coherence/coherence-free-vs-bound-region.stderr
index e2d84b833..c97b32e42 100644
--- a/tests/ui/coherence/coherence-free-vs-bound-region.stderr
+++ b/tests/ui/coherence/coherence-free-vs-bound-region.stderr
@@ -16,5 +16,5 @@ note: the lint level is defined here
LL | #![deny(coherence_leak_check)]
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/coherence/coherence-fundamental-trait-objects.stderr b/tests/ui/coherence/coherence-fundamental-trait-objects.stderr
index a35a95ef4..db6a94748 100644
--- a/tests/ui/coherence/coherence-fundamental-trait-objects.stderr
+++ b/tests/ui/coherence/coherence-fundamental-trait-objects.stderr
@@ -9,6 +9,6 @@ LL | impl Misc for dyn Fundamental<Local> {}
|
= note: define and implement a trait or new type instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0117`.
diff --git a/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr b/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr
index 684e52822..9f813d6d5 100644
--- a/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr
+++ b/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr
@@ -22,6 +22,6 @@ LL | trait Trait<T> { type Assoc; }
| ^^^^^^^^^^^^^^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/coherence/coherence-inherited-subtyping.stderr b/tests/ui/coherence/coherence-inherited-subtyping.stderr
index f60b2aa27..5c5753939 100644
--- a/tests/ui/coherence/coherence-inherited-subtyping.stderr
+++ b/tests/ui/coherence/coherence-inherited-subtyping.stderr
@@ -9,6 +9,6 @@ LL | fn method1(&self) {}
|
= note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0592`.
diff --git a/tests/ui/coherence/coherence-lone-type-parameter.stderr b/tests/ui/coherence/coherence-lone-type-parameter.stderr
index ef5b08836..48d25bba8 100644
--- a/tests/ui/coherence/coherence-lone-type-parameter.stderr
+++ b/tests/ui/coherence/coherence-lone-type-parameter.stderr
@@ -7,6 +7,6 @@ LL | impl<T> Remote for T { }
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
= note: only traits defined in the current crate can be implemented for a type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0210`.
diff --git a/tests/ui/coherence/coherence-negative-impls-safe-rpass.rs b/tests/ui/coherence/coherence-negative-impls-safe-rpass.rs
index b87e162ac..d5306d59e 100644
--- a/tests/ui/coherence/coherence-negative-impls-safe-rpass.rs
+++ b/tests/ui/coherence/coherence-negative-impls-safe-rpass.rs
@@ -4,8 +4,6 @@
#![feature(negative_impls)]
-use std::marker::Send;
-
struct TestType;
impl !Send for TestType {}
diff --git a/tests/ui/coherence/coherence-negative-impls-safe.stderr b/tests/ui/coherence/coherence-negative-impls-safe.stderr
index 1bd37f395..759e50c3b 100644
--- a/tests/ui/coherence/coherence-negative-impls-safe.stderr
+++ b/tests/ui/coherence/coherence-negative-impls-safe.stderr
@@ -7,6 +7,6 @@ LL | unsafe impl !Send for TestType {}
| | negative because of this
| unsafe because of this
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0198`.
diff --git a/tests/ui/coherence/coherence-negative-outlives-lifetimes.rs b/tests/ui/coherence/coherence-negative-outlives-lifetimes.rs
index 0e16d12a1..531977d6d 100644
--- a/tests/ui/coherence/coherence-negative-outlives-lifetimes.rs
+++ b/tests/ui/coherence/coherence-negative-outlives-lifetimes.rs
@@ -1,5 +1,9 @@
// revisions: stock with_negative_coherence
+
//[with_negative_coherence] known-bug: unknown
+// Ideally this would work, but we don't use `&'a T` to imply that `T: 'a`
+// which is required for `&'a T: !MyPredicate` to hold. This is similar to the
+// test `negative-coherence-placeholder-region-constraints-on-unification.explicit.stderr`
#![feature(negative_impls)]
#![cfg_attr(with_negative_coherence, feature(with_negative_coherence))]
diff --git a/tests/ui/coherence/coherence-negative-outlives-lifetimes.stock.stderr b/tests/ui/coherence/coherence-negative-outlives-lifetimes.stock.stderr
index 097cc4e0f..dbb22d893 100644
--- a/tests/ui/coherence/coherence-negative-outlives-lifetimes.stock.stderr
+++ b/tests/ui/coherence/coherence-negative-outlives-lifetimes.stock.stderr
@@ -1,11 +1,11 @@
error[E0119]: conflicting implementations of trait `MyTrait<'_>` for type `&_`
- --> $DIR/coherence-negative-outlives-lifetimes.rs:14:1
+ --> $DIR/coherence-negative-outlives-lifetimes.rs:18:1
|
LL | impl<'a, T: MyPredicate<'a>> MyTrait<'a> for T {}
| ---------------------------------------------- first implementation here
LL | impl<'a, T> MyTrait<'a> for &'a T {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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/coherence/coherence-negative-outlives-lifetimes.with_negative_coherence.stderr b/tests/ui/coherence/coherence-negative-outlives-lifetimes.with_negative_coherence.stderr
index 097cc4e0f..dbb22d893 100644
--- a/tests/ui/coherence/coherence-negative-outlives-lifetimes.with_negative_coherence.stderr
+++ b/tests/ui/coherence/coherence-negative-outlives-lifetimes.with_negative_coherence.stderr
@@ -1,11 +1,11 @@
error[E0119]: conflicting implementations of trait `MyTrait<'_>` for type `&_`
- --> $DIR/coherence-negative-outlives-lifetimes.rs:14:1
+ --> $DIR/coherence-negative-outlives-lifetimes.rs:18:1
|
LL | impl<'a, T: MyPredicate<'a>> MyTrait<'a> for T {}
| ---------------------------------------------- first implementation here
LL | impl<'a, T> MyTrait<'a> for &'a T {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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/coherence/coherence-no-direct-lifetime-dispatch.stderr b/tests/ui/coherence/coherence-no-direct-lifetime-dispatch.stderr
index 8a43ad7b7..ca8d7a5c4 100644
--- a/tests/ui/coherence/coherence-no-direct-lifetime-dispatch.stderr
+++ b/tests/ui/coherence/coherence-no-direct-lifetime-dispatch.stderr
@@ -6,6 +6,6 @@ LL | impl<T> MyTrait for T {}
LL | impl<T: 'static> MyTrait for T {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
-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/coherence/coherence-overlap-all-t-and-tuple.stderr b/tests/ui/coherence/coherence-overlap-all-t-and-tuple.stderr
index 6a0880334..a6e47d9f9 100644
--- a/tests/ui/coherence/coherence-overlap-all-t-and-tuple.stderr
+++ b/tests/ui/coherence/coherence-overlap-all-t-and-tuple.stderr
@@ -7,6 +7,6 @@ LL | impl <T> From<T> for T {
LL | impl <T11, U11> From<(U11,)> for (T11,) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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/coherence/coherence-overlap-downstream-inherent.rs b/tests/ui/coherence/coherence-overlap-downstream-inherent.rs
index 2c3ef4fd3..94a7ecbe1 100644
--- a/tests/ui/coherence/coherence-overlap-downstream-inherent.rs
+++ b/tests/ui/coherence/coherence-overlap-downstream-inherent.rs
@@ -1,5 +1,5 @@
// revisions: old next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
// Tests that we consider `T: Sugar + Fruit` to be ambiguous, even
// though no impls are found.
diff --git a/tests/ui/coherence/coherence-overlap-downstream.rs b/tests/ui/coherence/coherence-overlap-downstream.rs
index a4e559604..171b2a32f 100644
--- a/tests/ui/coherence/coherence-overlap-downstream.rs
+++ b/tests/ui/coherence/coherence-overlap-downstream.rs
@@ -1,5 +1,5 @@
// revisions: old next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
// Tests that we consider `T: Sugar + Fruit` to be ambiguous, even
// though no impls are found.
diff --git a/tests/ui/coherence/coherence-overlap-issue-23516-inherent.next.stderr b/tests/ui/coherence/coherence-overlap-issue-23516-inherent.next.stderr
index c02a679c1..2f3ad6278 100644
--- a/tests/ui/coherence/coherence-overlap-issue-23516-inherent.next.stderr
+++ b/tests/ui/coherence/coherence-overlap-issue-23516-inherent.next.stderr
@@ -9,6 +9,6 @@ LL | impl<U:Sugar> Cake<Box<U>> { fn dummy(&self) { } }
|
= note: downstream crates may implement trait `Sugar` 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 E0592`.
diff --git a/tests/ui/coherence/coherence-overlap-issue-23516-inherent.old.stderr b/tests/ui/coherence/coherence-overlap-issue-23516-inherent.old.stderr
index c02a679c1..2f3ad6278 100644
--- a/tests/ui/coherence/coherence-overlap-issue-23516-inherent.old.stderr
+++ b/tests/ui/coherence/coherence-overlap-issue-23516-inherent.old.stderr
@@ -9,6 +9,6 @@ LL | impl<U:Sugar> Cake<Box<U>> { fn dummy(&self) { } }
|
= note: downstream crates may implement trait `Sugar` 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 E0592`.
diff --git a/tests/ui/coherence/coherence-overlap-issue-23516-inherent.rs b/tests/ui/coherence/coherence-overlap-issue-23516-inherent.rs
index a7c90a6b8..6f5cc9804 100644
--- a/tests/ui/coherence/coherence-overlap-issue-23516-inherent.rs
+++ b/tests/ui/coherence/coherence-overlap-issue-23516-inherent.rs
@@ -1,5 +1,5 @@
// revisions: old next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
// Tests that we consider `Box<U>: !Sugar` to be ambiguous, even
// though we see no impl of `Sugar` for `Box`. Therefore, an overlap
diff --git a/tests/ui/coherence/coherence-overlap-issue-23516.next.stderr b/tests/ui/coherence/coherence-overlap-issue-23516.next.stderr
index a4e87af8a..b94947740 100644
--- a/tests/ui/coherence/coherence-overlap-issue-23516.next.stderr
+++ b/tests/ui/coherence/coherence-overlap-issue-23516.next.stderr
@@ -8,6 +8,6 @@ LL | impl<U:Sugar> Sweet for Box<U> { }
|
= note: downstream crates may implement trait `Sugar` 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/coherence/coherence-overlap-issue-23516.old.stderr b/tests/ui/coherence/coherence-overlap-issue-23516.old.stderr
index a4e87af8a..b94947740 100644
--- a/tests/ui/coherence/coherence-overlap-issue-23516.old.stderr
+++ b/tests/ui/coherence/coherence-overlap-issue-23516.old.stderr
@@ -8,6 +8,6 @@ LL | impl<U:Sugar> Sweet for Box<U> { }
|
= note: downstream crates may implement trait `Sugar` 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/coherence/coherence-overlap-issue-23516.rs b/tests/ui/coherence/coherence-overlap-issue-23516.rs
index c846d3971..4daaed436 100644
--- a/tests/ui/coherence/coherence-overlap-issue-23516.rs
+++ b/tests/ui/coherence/coherence-overlap-issue-23516.rs
@@ -1,5 +1,5 @@
// revisions: old next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
// Tests that we consider `Box<U>: !Sugar` to be ambiguous, even
// though we see no impl of `Sugar` for `Box`. Therefore, an overlap
diff --git a/tests/ui/coherence/coherence-overlap-negate-not-use-feature-gate.stderr b/tests/ui/coherence/coherence-overlap-negate-not-use-feature-gate.stderr
index 4b55001ec..21c82eedd 100644
--- a/tests/ui/coherence/coherence-overlap-negate-not-use-feature-gate.stderr
+++ b/tests/ui/coherence/coherence-overlap-negate-not-use-feature-gate.stderr
@@ -6,6 +6,6 @@ LL | impl<T: DerefMut> Foo for T {}
LL | impl<U> Foo for &U {}
| ^^^^^^^^^^^^^^^^^^ 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/coherence/coherence-overlap-trait-alias.stderr b/tests/ui/coherence/coherence-overlap-trait-alias.stderr
index 687f3af00..4f277ad68 100644
--- a/tests/ui/coherence/coherence-overlap-trait-alias.stderr
+++ b/tests/ui/coherence/coherence-overlap-trait-alias.stderr
@@ -6,6 +6,6 @@ LL | impl<T: AB> C for T {}
LL | impl C for u32 {}
| ^^^^^^^^^^^^^^ conflicting implementation for `u32`
-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/coherence/coherence-overlap-upstream-inherent.stderr b/tests/ui/coherence/coherence-overlap-upstream-inherent.stderr
index f355c6e85..65885ecac 100644
--- a/tests/ui/coherence/coherence-overlap-upstream-inherent.stderr
+++ b/tests/ui/coherence/coherence-overlap-upstream-inherent.stderr
@@ -9,6 +9,6 @@ LL | impl A<i16> { fn dummy(&self) { } }
|
= note: upstream crates may add a new impl of trait `coherence_lib::Remote` for type `i16` in future versions
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0592`.
diff --git a/tests/ui/coherence/coherence-overlap-upstream.stderr b/tests/ui/coherence/coherence-overlap-upstream.stderr
index 8272c8875..212ef484a 100644
--- a/tests/ui/coherence/coherence-overlap-upstream.stderr
+++ b/tests/ui/coherence/coherence-overlap-upstream.stderr
@@ -8,6 +8,6 @@ LL | impl Foo for i16 {}
|
= note: upstream crates may add a new impl of trait `coherence_lib::Remote` for type `i16` in future versions
-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/coherence/coherence-overlap-with-regions.rs b/tests/ui/coherence/coherence-overlap-with-regions.rs
index 9945c8e6c..32f01f418 100644
--- a/tests/ui/coherence/coherence-overlap-with-regions.rs
+++ b/tests/ui/coherence/coherence-overlap-with-regions.rs
@@ -1,10 +1,4 @@
-// known-bug: unknown
-
-// This fails because we currently perform negative coherence in coherence mode.
-// This means that when looking for a negative predicate, we also assemble a
-// coherence-unknowable predicate. Since confirming the negative impl has region
-// obligations, we don't prefer the impl over the unknowable predicate
-// unconditionally and instead flounder.
+// check-pass
#![feature(negative_impls)]
#![feature(rustc_attrs)]
diff --git a/tests/ui/coherence/coherence-overlap-with-regions.stderr b/tests/ui/coherence/coherence-overlap-with-regions.stderr
deleted file mode 100644
index fd25f0978..000000000
--- a/tests/ui/coherence/coherence-overlap-with-regions.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0119]: conflicting implementations of trait `Bar` for type `&_`
- --> $DIR/coherence-overlap-with-regions.rs:20:1
- |
-LL | impl<T: Foo> Bar for T {}
- | ---------------------- first implementation here
-LL | impl<T> Bar for &T where T: 'static {}
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-overlapping-pairs.stderr b/tests/ui/coherence/coherence-overlapping-pairs.stderr
index 15c92dfeb..4d0a9c6ee 100644
--- a/tests/ui/coherence/coherence-overlapping-pairs.stderr
+++ b/tests/ui/coherence/coherence-overlapping-pairs.stderr
@@ -9,6 +9,6 @@ LL | impl<T> Remote for lib::Pair<T,Foo> { }
|
= note: define and implement a trait or new type instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0117`.
diff --git a/tests/ui/coherence/coherence-pair-covered-uncovered-1.stderr b/tests/ui/coherence/coherence-pair-covered-uncovered-1.stderr
index 03d787123..15cd66e9d 100644
--- a/tests/ui/coherence/coherence-pair-covered-uncovered-1.stderr
+++ b/tests/ui/coherence/coherence-pair-covered-uncovered-1.stderr
@@ -10,6 +10,6 @@ LL | impl<T, U> Remote1<Pair<T, Local<U>>> for i32 { }
|
= note: define and implement a trait or new type instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0117`.
diff --git a/tests/ui/coherence/coherence-pair-covered-uncovered.stderr b/tests/ui/coherence/coherence-pair-covered-uncovered.stderr
index 73dfe2f57..359dbe850 100644
--- a/tests/ui/coherence/coherence-pair-covered-uncovered.stderr
+++ b/tests/ui/coherence/coherence-pair-covered-uncovered.stderr
@@ -9,6 +9,6 @@ LL | impl<T,U> Remote for Pair<T,Local<U>> { }
|
= note: define and implement a trait or new type instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0117`.
diff --git a/tests/ui/coherence/coherence-projection-conflict-orphan.stderr b/tests/ui/coherence/coherence-projection-conflict-orphan.stderr
index b1ee0795b..976018993 100644
--- a/tests/ui/coherence/coherence-projection-conflict-orphan.stderr
+++ b/tests/ui/coherence/coherence-projection-conflict-orphan.stderr
@@ -9,6 +9,6 @@ LL | impl<A:Iterator> Foo<A::Item> for A { }
|
= note: upstream crates may add a new impl of trait `std::iter::Iterator` for type `i32` in future versions
-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/coherence/coherence-projection-conflict-ty-param.stderr b/tests/ui/coherence/coherence-projection-conflict-ty-param.stderr
index 94d242eaa..f074467bb 100644
--- a/tests/ui/coherence/coherence-projection-conflict-ty-param.stderr
+++ b/tests/ui/coherence/coherence-projection-conflict-ty-param.stderr
@@ -7,6 +7,6 @@ LL |
LL | impl<T, U> Foo<T> for Option<U> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Option<_>`
-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/coherence/coherence-projection-conflict.stderr b/tests/ui/coherence/coherence-projection-conflict.stderr
index 7d2c584c3..c916091e6 100644
--- a/tests/ui/coherence/coherence-projection-conflict.stderr
+++ b/tests/ui/coherence/coherence-projection-conflict.stderr
@@ -7,6 +7,6 @@ LL |
LL | impl<A:Bar> Foo<A::Output> for A { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32`
-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/coherence/coherence-tuple-conflict.stderr b/tests/ui/coherence/coherence-tuple-conflict.stderr
index 09ad5e5b2..4e02c0eb4 100644
--- a/tests/ui/coherence/coherence-tuple-conflict.stderr
+++ b/tests/ui/coherence/coherence-tuple-conflict.stderr
@@ -7,6 +7,6 @@ LL | impl<T> MyTrait for (T,T) {
LL | impl<A,B> MyTrait for (A,B) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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/coherence/coherence-unsafe-trait-object-impl.stderr b/tests/ui/coherence/coherence-unsafe-trait-object-impl.stderr
index a3a37fd27..4f898ec12 100644
--- a/tests/ui/coherence/coherence-unsafe-trait-object-impl.stderr
+++ b/tests/ui/coherence/coherence-unsafe-trait-object-impl.stderr
@@ -17,6 +17,6 @@ note: required by a bound in `takes_t`
LL | fn takes_t<S: Trait>(s: S) {
| ^^^^^ required by this bound in `takes_t`
-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/coherence/coherence-vec-local-2.stderr b/tests/ui/coherence/coherence-vec-local-2.stderr
index 95fdf172e..e4249710d 100644
--- a/tests/ui/coherence/coherence-vec-local-2.stderr
+++ b/tests/ui/coherence/coherence-vec-local-2.stderr
@@ -9,6 +9,6 @@ LL | impl<T> Remote for Vec<Local<T>> { }
|
= note: define and implement a trait or new type instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0117`.
diff --git a/tests/ui/coherence/coherence-vec-local.stderr b/tests/ui/coherence/coherence-vec-local.stderr
index 4835e771a..c465fb196 100644
--- a/tests/ui/coherence/coherence-vec-local.stderr
+++ b/tests/ui/coherence/coherence-vec-local.stderr
@@ -9,6 +9,6 @@ LL | impl Remote for Vec<Local> { }
|
= note: define and implement a trait or new type instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0117`.
diff --git a/tests/ui/coherence/coherence-wasm-bindgen.stderr b/tests/ui/coherence/coherence-wasm-bindgen.stderr
index 600cd42d8..b3c3dac61 100644
--- a/tests/ui/coherence/coherence-wasm-bindgen.stderr
+++ b/tests/ui/coherence/coherence-wasm-bindgen.stderr
@@ -23,5 +23,5 @@ note: the lint level is defined here
LL | #![deny(coherence_leak_check)]
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/coherence/coherence-where-clause.rs b/tests/ui/coherence/coherence-where-clause.rs
index 5c40def86..cd9a423f4 100644
--- a/tests/ui/coherence/coherence-where-clause.rs
+++ b/tests/ui/coherence/coherence-where-clause.rs
@@ -1,8 +1,6 @@
// run-pass
use std::fmt::Debug;
-use std::default::Default;
-
trait MyTrait {
fn get(&self) -> Self;
}
diff --git a/tests/ui/coherence/coherence-with-closure.stderr b/tests/ui/coherence/coherence-with-closure.stderr
index 431108e14..501279ffe 100644
--- a/tests/ui/coherence/coherence-with-closure.stderr
+++ b/tests/ui/coherence/coherence-with-closure.stderr
@@ -6,6 +6,6 @@ LL | impl Trait for Wrapper<OpaqueClosure> {}
LL | impl<T: Sync> Trait for Wrapper<T> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Wrapper<OpaqueClosure>`
-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/coherence/coherence-with-coroutine.stock.stderr b/tests/ui/coherence/coherence-with-coroutine.stock.stderr
index b2a9135c5..9cf20ea49 100644
--- a/tests/ui/coherence/coherence-with-coroutine.stock.stderr
+++ b/tests/ui/coherence/coherence-with-coroutine.stock.stderr
@@ -6,6 +6,6 @@ LL | impl Trait for Wrapper<OpaqueCoroutine> {}
LL | impl<T: Sync> Trait for Wrapper<T> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Wrapper<OpaqueCoroutine>`
-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/coherence/coherence_copy_like_err_fundamental_struct_tuple.stderr b/tests/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.stderr
index 93486fa5f..50bbe12bc 100644
--- a/tests/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.stderr
+++ b/tests/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.stderr
@@ -9,6 +9,6 @@ LL | impl MyTrait for lib::MyFundamentalStruct<(MyType,)> { }
|
= note: upstream crates may add a new impl of trait `lib::MyCopy` for type `lib::MyFundamentalStruct<(MyType,)>` in future versions
-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/coherence/coherence_copy_like_err_struct.stderr b/tests/ui/coherence/coherence_copy_like_err_struct.stderr
index 7432733b9..715a825ce 100644
--- a/tests/ui/coherence/coherence_copy_like_err_struct.stderr
+++ b/tests/ui/coherence/coherence_copy_like_err_struct.stderr
@@ -9,6 +9,6 @@ LL | impl MyTrait for lib::MyStruct<MyType> { }
|
= note: upstream crates may add a new impl of trait `lib::MyCopy` for type `lib::MyStruct<MyType>` in future versions
-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/coherence/coherence_copy_like_err_tuple.stderr b/tests/ui/coherence/coherence_copy_like_err_tuple.stderr
index 090497ec1..fbd293dba 100644
--- a/tests/ui/coherence/coherence_copy_like_err_tuple.stderr
+++ b/tests/ui/coherence/coherence_copy_like_err_tuple.stderr
@@ -9,6 +9,6 @@ LL | impl MyTrait for (MyType,) { }
|
= note: upstream crates may add a new impl of trait `lib::MyCopy` for type `(MyType,)` in future versions
-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/coherence/coherence_inherent.stderr b/tests/ui/coherence/coherence_inherent.stderr
index b381b0680..da8c03847 100644
--- a/tests/ui/coherence/coherence_inherent.stderr
+++ b/tests/ui/coherence/coherence_inherent.stderr
@@ -10,6 +10,6 @@ help: the following trait is implemented but not in scope; perhaps add a `use` f
LL + use Lib::TheTrait;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/coherence/coherence_inherent_cc.stderr b/tests/ui/coherence/coherence_inherent_cc.stderr
index 7b6cb7d43..d34f6fa21 100644
--- a/tests/ui/coherence/coherence_inherent_cc.stderr
+++ b/tests/ui/coherence/coherence_inherent_cc.stderr
@@ -10,6 +10,6 @@ help: the following trait is implemented but not in scope; perhaps add a `use` f
LL + use coherence_inherent_cc_lib::TheTrait;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/coherence/coherence_local_err_struct.stderr b/tests/ui/coherence/coherence_local_err_struct.stderr
index afc6fc45d..96572b5a7 100644
--- a/tests/ui/coherence/coherence_local_err_struct.stderr
+++ b/tests/ui/coherence/coherence_local_err_struct.stderr
@@ -9,6 +9,6 @@ LL | impl lib::MyCopy for lib::MyStruct<MyType> { }
|
= note: define and implement a trait or new type instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0117`.
diff --git a/tests/ui/coherence/coherence_local_err_tuple.stderr b/tests/ui/coherence/coherence_local_err_tuple.stderr
index a4953859f..85a063bb3 100644
--- a/tests/ui/coherence/coherence_local_err_tuple.stderr
+++ b/tests/ui/coherence/coherence_local_err_tuple.stderr
@@ -9,6 +9,6 @@ LL | impl lib::MyCopy for (MyType,) { }
|
= note: define and implement a trait or new type instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0117`.
diff --git a/tests/ui/coherence/deep-bad-copy-reason.stderr b/tests/ui/coherence/deep-bad-copy-reason.stderr
index 7b6dd4b38..e79abe355 100644
--- a/tests/ui/coherence/deep-bad-copy-reason.stderr
+++ b/tests/ui/coherence/deep-bad-copy-reason.stderr
@@ -13,6 +13,6 @@ note: the `Copy` impl for `Interned<'tcx, ListS<T>>` requires that `OpaqueListCo
LL | pub struct List<'tcx, T>(Interned<'tcx, ListS<T>>);
| ^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0204`.
diff --git a/tests/ui/coherence/illegal-copy-bad-projection.stderr b/tests/ui/coherence/illegal-copy-bad-projection.stderr
index 8fed9ba23..2a74cb5a9 100644
--- a/tests/ui/coherence/illegal-copy-bad-projection.stderr
+++ b/tests/ui/coherence/illegal-copy-bad-projection.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `void` in this scope
LL | type Ptr = *const void;
| ^^^^ 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/coherence/impl-foreign-for-foreign.stderr b/tests/ui/coherence/impl-foreign-for-foreign.stderr
index 93f7a6fdc..6c74b47a1 100644
--- a/tests/ui/coherence/impl-foreign-for-foreign.stderr
+++ b/tests/ui/coherence/impl-foreign-for-foreign.stderr
@@ -9,6 +9,6 @@ LL | impl Remote for i32 {
|
= note: define and implement a trait or new type instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0117`.
diff --git a/tests/ui/coherence/impl-foreign[foreign]-for-foreign.stderr b/tests/ui/coherence/impl-foreign[foreign]-for-foreign.stderr
index 65b3aa394..fe8a34b78 100644
--- a/tests/ui/coherence/impl-foreign[foreign]-for-foreign.stderr
+++ b/tests/ui/coherence/impl-foreign[foreign]-for-foreign.stderr
@@ -10,6 +10,6 @@ LL | impl Remote1<u32> for f64 {
|
= note: define and implement a trait or new type instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0117`.
diff --git a/tests/ui/coherence/impl[t]-foreign-for-fundamental[t].stderr b/tests/ui/coherence/impl[t]-foreign-for-fundamental[t].stderr
index 249a5c44c..12d9a807f 100644
--- a/tests/ui/coherence/impl[t]-foreign-for-fundamental[t].stderr
+++ b/tests/ui/coherence/impl[t]-foreign-for-fundamental[t].stderr
@@ -7,6 +7,6 @@ LL | impl<T> Remote for Box<T> {
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
= note: only traits defined in the current crate can be implemented for a type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0210`.
diff --git a/tests/ui/coherence/impl[t]-foreign[foreign]-for-t.stderr b/tests/ui/coherence/impl[t]-foreign[foreign]-for-t.stderr
index aed184767..6ca3ccd05 100644
--- a/tests/ui/coherence/impl[t]-foreign[foreign]-for-t.stderr
+++ b/tests/ui/coherence/impl[t]-foreign[foreign]-for-t.stderr
@@ -7,6 +7,6 @@ LL | impl<T> Remote1<u32> for T {
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
= note: only traits defined in the current crate can be implemented for a type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0210`.
diff --git a/tests/ui/coherence/impl[t]-foreign[local]-for-t.stderr b/tests/ui/coherence/impl[t]-foreign[local]-for-t.stderr
index d97e85dcb..1f3463e88 100644
--- a/tests/ui/coherence/impl[t]-foreign[local]-for-t.stderr
+++ b/tests/ui/coherence/impl[t]-foreign[local]-for-t.stderr
@@ -7,6 +7,6 @@ LL | impl<T> Remote1<Local> for T {
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type
= note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait<T1, ..., Tn> for T0`, where `T0` is the first and `Tn` is the last
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0210`.
diff --git a/tests/ui/coherence/impl[t]-foreign[t]-for-foreign.stderr b/tests/ui/coherence/impl[t]-foreign[t]-for-foreign.stderr
index 44e3b7eed..a1f393649 100644
--- a/tests/ui/coherence/impl[t]-foreign[t]-for-foreign.stderr
+++ b/tests/ui/coherence/impl[t]-foreign[t]-for-foreign.stderr
@@ -7,6 +7,6 @@ LL | impl<T> Remote1<T> for u32 {
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
= note: only traits defined in the current crate can be implemented for a type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0210`.
diff --git a/tests/ui/coherence/impl[t]-foreign[t]-for-t.stderr b/tests/ui/coherence/impl[t]-foreign[t]-for-t.stderr
index ff72969dc..acd84f711 100644
--- a/tests/ui/coherence/impl[t]-foreign[t]-for-t.stderr
+++ b/tests/ui/coherence/impl[t]-foreign[t]-for-t.stderr
@@ -7,6 +7,6 @@ LL | impl<T> Remote1<T> for T {
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
= note: only traits defined in the current crate can be implemented for a type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0210`.
diff --git a/tests/ui/coherence/inter-crate-ambiguity-causes-notes.next.stderr b/tests/ui/coherence/inter-crate-ambiguity-causes-notes.next.stderr
index 9b2dbc66c..74be598c4 100644
--- a/tests/ui/coherence/inter-crate-ambiguity-causes-notes.next.stderr
+++ b/tests/ui/coherence/inter-crate-ambiguity-causes-notes.next.stderr
@@ -12,6 +12,6 @@ LL | | I: Iterator<Item = ()>,
|
= note: upstream crates may add a new impl of trait `std::iter::Iterator` for type `()` in future versions
-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/coherence/inter-crate-ambiguity-causes-notes.old.stderr b/tests/ui/coherence/inter-crate-ambiguity-causes-notes.old.stderr
index 9b2dbc66c..74be598c4 100644
--- a/tests/ui/coherence/inter-crate-ambiguity-causes-notes.old.stderr
+++ b/tests/ui/coherence/inter-crate-ambiguity-causes-notes.old.stderr
@@ -12,6 +12,6 @@ LL | | I: Iterator<Item = ()>,
|
= note: upstream crates may add a new impl of trait `std::iter::Iterator` for type `()` in future versions
-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/coherence/inter-crate-ambiguity-causes-notes.rs b/tests/ui/coherence/inter-crate-ambiguity-causes-notes.rs
index 743e80d3f..0f785b4e5 100644
--- a/tests/ui/coherence/inter-crate-ambiguity-causes-notes.rs
+++ b/tests/ui/coherence/inter-crate-ambiguity-causes-notes.rs
@@ -1,5 +1,5 @@
// revisions: old next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
struct S;
diff --git a/tests/ui/coherence/negative-coherence-check-placeholder-outlives.rs b/tests/ui/coherence/negative-coherence-check-placeholder-outlives.rs
new file mode 100644
index 000000000..5d8beb451
--- /dev/null
+++ b/tests/ui/coherence/negative-coherence-check-placeholder-outlives.rs
@@ -0,0 +1,14 @@
+#![feature(negative_impls)]
+#![feature(with_negative_coherence)]
+
+struct Wrap<T>(T);
+
+trait Foo {}
+impl<T: 'static> !Foo for Box<T> {}
+
+trait Bar {}
+impl<T> Bar for T where T: Foo {}
+impl<T> Bar for Box<T> {}
+//~^ ERROR conflicting implementations of trait `Bar` for type `Box<_>`
+
+fn main() {}
diff --git a/tests/ui/coherence/negative-coherence-considering-regions.static_lt.stderr b/tests/ui/coherence/negative-coherence-check-placeholder-outlives.stderr
index 87e7be2aa..f515c39ea 100644
--- a/tests/ui/coherence/negative-coherence-considering-regions.static_lt.stderr
+++ b/tests/ui/coherence/negative-coherence-check-placeholder-outlives.stderr
@@ -1,12 +1,11 @@
-error[E0119]: conflicting implementations of trait `Bar` for type `&'static _`
- --> $DIR/negative-coherence-considering-regions.rs:26:1
+error[E0119]: conflicting implementations of trait `Bar` for type `Box<_>`
+ --> $DIR/negative-coherence-check-placeholder-outlives.rs:11:1
|
LL | impl<T> Bar for T where T: Foo {}
| ------------------------------ first implementation here
-...
-LL | impl<T> Bar for &'static T {}
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `&'static _`
+LL | impl<T> Bar for Box<T> {}
+ | ^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `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/coherence/negative-coherence-considering-regions.any_lt.stderr b/tests/ui/coherence/negative-coherence-considering-regions.any_lt.stderr
index 4cf50b4f2..f24de10f6 100644
--- a/tests/ui/coherence/negative-coherence-considering-regions.any_lt.stderr
+++ b/tests/ui/coherence/negative-coherence-considering-regions.any_lt.stderr
@@ -1,5 +1,5 @@
error[E0119]: conflicting implementations of trait `Bar` for type `&_`
- --> $DIR/negative-coherence-considering-regions.rs:22:1
+ --> $DIR/negative-coherence-considering-regions.rs:16:1
|
LL | impl<T> Bar for T where T: Foo {}
| ------------------------------ first implementation here
@@ -7,6 +7,6 @@ LL | impl<T> Bar for T where T: Foo {}
LL | impl<T> Bar for &T {}
| ^^^^^^^^^^^^^^^^^^ 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/coherence/negative-coherence-considering-regions.rs b/tests/ui/coherence/negative-coherence-considering-regions.rs
index 597a59726..a43ad19ec 100644
--- a/tests/ui/coherence/negative-coherence-considering-regions.rs
+++ b/tests/ui/coherence/negative-coherence-considering-regions.rs
@@ -1,11 +1,5 @@
// revisions: any_lt static_lt
-//[static_lt] known-bug: unknown
-
-// This fails because we currently perform negative coherence in coherence mode.
-// This means that when looking for a negative predicate, we also assemble a
-// coherence-unknowable predicate. Since confirming the negative impl has region
-// obligations, we don't prefer the impl over the unknowable predicate
-// unconditionally and instead flounder.
+//[static_lt] check-pass
#![feature(negative_impls)]
#![feature(with_negative_coherence)]
diff --git a/tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.explicit.stderr b/tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.explicit.stderr
new file mode 100644
index 000000000..5368db293
--- /dev/null
+++ b/tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.explicit.stderr
@@ -0,0 +1,19 @@
+error: conflicting implementations of trait `FnMarker` for type `fn(&_)`
+ --> $DIR/negative-coherence-placeholder-region-constraints-on-unification.rs:21:1
+ |
+LL | impl<T: ?Sized + Marker> FnMarker for fn(T) {}
+ | ------------------------------------------- first implementation here
+LL | impl<T: ?Sized> FnMarker for fn(&T) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `fn(&_)`
+ |
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+ = note: for more information, see issue #56105 <https://github.com/rust-lang/rust/issues/56105>
+ = note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
+note: the lint level is defined here
+ --> $DIR/negative-coherence-placeholder-region-constraints-on-unification.rs:4:11
+ |
+LL | #![forbid(coherence_leak_check)]
+ | ^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.rs b/tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.rs
new file mode 100644
index 000000000..26d9d84d8
--- /dev/null
+++ b/tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.rs
@@ -0,0 +1,25 @@
+// revisions: explicit implicit
+//[implicit] check-pass
+
+#![forbid(coherence_leak_check)]
+#![feature(negative_impls, with_negative_coherence)]
+
+pub trait Marker {}
+
+#[cfg(implicit)]
+impl<T: ?Sized> !Marker for &T {}
+
+#[cfg(explicit)]
+impl<'a, T: ?Sized + 'a> !Marker for &'a T {}
+
+trait FnMarker {}
+
+// Unifying these two impls below results in a `T: '!0` obligation
+// that we shouldn't need to care about. Ideally, we'd treat that
+// as an assumption when proving `&'!0 T: Marker`...
+impl<T: ?Sized + Marker> FnMarker for fn(T) {}
+impl<T: ?Sized> FnMarker for fn(&T) {}
+//[explicit]~^ ERROR conflicting implementations of trait `FnMarker` for type `fn(&_)`
+//[explicit]~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+
+fn main() {}
diff --git a/tests/ui/coherence/normalize-for-errors.current.stderr b/tests/ui/coherence/normalize-for-errors.current.stderr
new file mode 100644
index 000000000..0e48aaed8
--- /dev/null
+++ b/tests/ui/coherence/normalize-for-errors.current.stderr
@@ -0,0 +1,14 @@
+error[E0119]: conflicting implementations of trait `MyTrait<_>` for type `(Box<(MyType,)>, _)`
+ --> $DIR/normalize-for-errors.rs:16:1
+ |
+LL | impl<T: Copy, S: Iterator> MyTrait<S> for (T, S::Item) {}
+ | ------------------------------------------------------ first implementation here
+LL |
+LL | impl<S: Iterator> MyTrait<S> for (Box<<(MyType,) as Mirror>::Assoc>, S::Item) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(Box<(MyType,)>, _)`
+ |
+ = note: upstream crates may add a new impl of trait `std::marker::Copy` for type `std::boxed::Box<(MyType,)>` in future versions
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/normalize-for-errors.next.stderr b/tests/ui/coherence/normalize-for-errors.next.stderr
new file mode 100644
index 000000000..a8a7d437b
--- /dev/null
+++ b/tests/ui/coherence/normalize-for-errors.next.stderr
@@ -0,0 +1,14 @@
+error[E0119]: conflicting implementations of trait `MyTrait<_>` for type `(Box<(MyType,)>, <_ as Iterator>::Item)`
+ --> $DIR/normalize-for-errors.rs:16:1
+ |
+LL | impl<T: Copy, S: Iterator> MyTrait<S> for (T, S::Item) {}
+ | ------------------------------------------------------ first implementation here
+LL |
+LL | impl<S: Iterator> MyTrait<S> for (Box<<(MyType,) as Mirror>::Assoc>, S::Item) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(Box<(MyType,)>, <_ as Iterator>::Item)`
+ |
+ = note: upstream crates may add a new impl of trait `std::marker::Copy` for type `std::boxed::Box<(MyType,)>` in future versions
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/normalize-for-errors.rs b/tests/ui/coherence/normalize-for-errors.rs
new file mode 100644
index 000000000..30723518b
--- /dev/null
+++ b/tests/ui/coherence/normalize-for-errors.rs
@@ -0,0 +1,21 @@
+// revisions: current next
+//[next] compile-flags: -Znext-solver
+
+struct MyType;
+trait MyTrait<S> {}
+
+trait Mirror {
+ type Assoc;
+}
+impl<T> Mirror for T {
+ type Assoc = T;
+}
+
+impl<T: Copy, S: Iterator> MyTrait<S> for (T, S::Item) {}
+//~^ NOTE first implementation here
+impl<S: Iterator> MyTrait<S> for (Box<<(MyType,) as Mirror>::Assoc>, S::Item) {}
+//~^ ERROR conflicting implementations of trait `MyTrait<_>` for type `(Box<(MyType,)>,
+//~| NOTE conflicting implementation for `(Box<(MyType,)>,
+//~| NOTE upstream crates may add a new impl of trait `std::marker::Copy` for type `std::boxed::Box<(MyType,)>` in future versions
+
+fn main() {}
diff --git a/tests/ui/coherence/occurs-check/associated-type.next.stderr b/tests/ui/coherence/occurs-check/associated-type.next.stderr
new file mode 100644
index 000000000..f64e8b397
--- /dev/null
+++ b/tests/ui/coherence/occurs-check/associated-type.next.stderr
@@ -0,0 +1,25 @@
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, RePlaceholder(!2_BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, RePlaceholder(!2_BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, RePlaceholder(!2_BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, RePlaceholder(!2_BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+error[E0119]: conflicting implementations of trait `Overlap<for<'a> fn(&'a (), ())>` for type `for<'a> fn(&'a (), ())`
+ --> $DIR/associated-type.rs:31:1
+ |
+LL | impl<T> Overlap<T> for T {
+ | ------------------------ first implementation here
+...
+LL | / impl<T> Overlap<for<'a> fn(&'a (), Assoc<'a, T>)> for T
+LL | |
+LL | | where
+LL | | for<'a> *const T: ToUnit<'a>,
+ | |_________________________________^ conflicting implementation for `for<'a> fn(&'a (), ())`
+ |
+ = note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/occurs-check/associated-type.old.stderr b/tests/ui/coherence/occurs-check/associated-type.old.stderr
new file mode 100644
index 000000000..8e852ec79
--- /dev/null
+++ b/tests/ui/coherence/occurs-check/associated-type.old.stderr
@@ -0,0 +1,25 @@
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, RePlaceholder(!3_BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, RePlaceholder(!3_BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, RePlaceholder(!3_BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, RePlaceholder(!3_BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+error[E0119]: conflicting implementations of trait `Overlap<for<'a> fn(&'a (), _)>` for type `for<'a> fn(&'a (), _)`
+ --> $DIR/associated-type.rs:31:1
+ |
+LL | impl<T> Overlap<T> for T {
+ | ------------------------ first implementation here
+...
+LL | / impl<T> Overlap<for<'a> fn(&'a (), Assoc<'a, T>)> for T
+LL | |
+LL | | where
+LL | | for<'a> *const T: ToUnit<'a>,
+ | |_________________________________^ conflicting implementation for `for<'a> fn(&'a (), _)`
+ |
+ = note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/occurs-check/associated-type.rs b/tests/ui/coherence/occurs-check/associated-type.rs
new file mode 100644
index 000000000..227b66847
--- /dev/null
+++ b/tests/ui/coherence/occurs-check/associated-type.rs
@@ -0,0 +1,45 @@
+// revisions: old next
+//[next] compile-flags: -Znext-solver
+
+// A regression test for #105787
+
+// Using the higher ranked projection hack to prevent us from replacing the projection
+// with an inference variable.
+trait ToUnit<'a> {
+ type Unit;
+}
+
+struct LocalTy;
+impl<'a> ToUnit<'a> for *const LocalTy {
+ type Unit = ();
+}
+
+impl<'a, T: Copy + ?Sized> ToUnit<'a> for *const T {
+ type Unit = ();
+}
+
+trait Overlap<T> {
+ type Assoc;
+}
+
+type Assoc<'a, T> = <*const T as ToUnit<'a>>::Unit;
+
+impl<T> Overlap<T> for T {
+ type Assoc = usize;
+}
+
+impl<T> Overlap<for<'a> fn(&'a (), Assoc<'a, T>)> for T
+//~^ ERROR conflicting implementations of trait
+where
+ for<'a> *const T: ToUnit<'a>,
+{
+ type Assoc = Box<usize>;
+}
+
+fn foo<T: Overlap<U>, U>(x: T::Assoc) -> T::Assoc {
+ x
+}
+
+fn main() {
+ foo::<for<'a> fn(&'a (), ()), for<'a> fn(&'a (), ())>(3usize);
+}
diff --git a/tests/ui/coherence/occurs-check/opaques.next.stderr b/tests/ui/coherence/occurs-check/opaques.next.stderr
new file mode 100644
index 000000000..428ee902e
--- /dev/null
+++ b/tests/ui/coherence/occurs-check/opaques.next.stderr
@@ -0,0 +1,12 @@
+error[E0119]: conflicting implementations of trait `Trait<Alias<_>>` for type `Alias<_>`
+ --> $DIR/opaques.rs:29:1
+ |
+LL | impl<T> Trait<T> for T {
+ | ---------------------- first implementation here
+...
+LL | impl<T> Trait<T> for defining_scope::Alias<T> {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Alias<_>`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/occurs-check/opaques.rs b/tests/ui/coherence/occurs-check/opaques.rs
new file mode 100644
index 000000000..2fa9dcebf
--- /dev/null
+++ b/tests/ui/coherence/occurs-check/opaques.rs
@@ -0,0 +1,37 @@
+//revisions: old next
+//[next] compile-flags: -Znext-solver
+
+// A regression test for #105787
+
+//[old] known-bug: #105787
+//[old] check-pass
+#![feature(type_alias_impl_trait)]
+mod defining_scope {
+ use super::*;
+ pub type Alias<T> = impl Sized;
+
+ pub fn cast<T>(x: Container<Alias<T>, T>) -> Container<T, T> {
+ x
+ }
+}
+
+struct Container<T: Trait<U>, U> {
+ x: <T as Trait<U>>::Assoc,
+}
+
+trait Trait<T> {
+ type Assoc;
+}
+
+impl<T> Trait<T> for T {
+ type Assoc = Box<u32>;
+}
+impl<T> Trait<T> for defining_scope::Alias<T> {
+ //[next]~^ ERROR conflicting implementations of trait
+ type Assoc = usize;
+}
+
+fn main() {
+ let x: Box<u32> = defining_scope::cast::<()>(Container { x: 0 }).x;
+ println!("{}", *x);
+}
diff --git a/tests/ui/coherence/strict-coherence-needs-negative-coherence.stderr b/tests/ui/coherence/strict-coherence-needs-negative-coherence.stderr
index b54729287..82804e8ba 100644
--- a/tests/ui/coherence/strict-coherence-needs-negative-coherence.stderr
+++ b/tests/ui/coherence/strict-coherence-needs-negative-coherence.stderr
@@ -6,5 +6,5 @@ LL | #[rustc_strict_coherence]
LL | trait Foo {}
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.stderr b/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.stderr
index 4f32639a6..4535b6f68 100644
--- a/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.stderr
+++ b/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.stderr
@@ -22,7 +22,7 @@ note: the lint level is defined here
LL | #![deny(coinductive_overlap_in_coherence)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
Future incompatibility report: Future breakage diagnostic:
error: implementations of `PartialEq<Interval<_>>` for `Interval<_>` will conflict in the future