about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/impl-trait/auto-trait-coherence.next.stderr (renamed from tests/ui/impl-trait/auto-trait.stderr)2
-rw-r--r--tests/ui/impl-trait/auto-trait-coherence.old.stderr12
-rw-r--r--tests/ui/impl-trait/auto-trait-coherence.rs (renamed from tests/ui/impl-trait/auto-trait.rs)3
3 files changed, 16 insertions, 1 deletions
diff --git a/tests/ui/impl-trait/auto-trait.stderr b/tests/ui/impl-trait/auto-trait-coherence.next.stderr
index 81009413c9a..7833ac688ba 100644
--- a/tests/ui/impl-trait/auto-trait.stderr
+++ b/tests/ui/impl-trait/auto-trait-coherence.next.stderr
@@ -1,5 +1,5 @@
 error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D<OpaqueType>`
-  --> $DIR/auto-trait.rs:21:1
+  --> $DIR/auto-trait-coherence.rs:24:1
    |
 LL | impl<T: Send> AnotherTrait for T {}
    | -------------------------------- first implementation here
diff --git a/tests/ui/impl-trait/auto-trait-coherence.old.stderr b/tests/ui/impl-trait/auto-trait-coherence.old.stderr
new file mode 100644
index 00000000000..7833ac688ba
--- /dev/null
+++ b/tests/ui/impl-trait/auto-trait-coherence.old.stderr
@@ -0,0 +1,12 @@
+error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D<OpaqueType>`
+  --> $DIR/auto-trait-coherence.rs:24:1
+   |
+LL | impl<T: Send> AnotherTrait for T {}
+   | -------------------------------- first implementation here
+...
+LL | impl AnotherTrait for D<OpaqueType> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `D<OpaqueType>`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/impl-trait/auto-trait.rs b/tests/ui/impl-trait/auto-trait-coherence.rs
index 35994e4a5ba..a5cd01a87ff 100644
--- a/tests/ui/impl-trait/auto-trait.rs
+++ b/tests/ui/impl-trait/auto-trait-coherence.rs
@@ -1,3 +1,6 @@
+// revisions: old next
+//[next] compile-flags: -Ztrait-solver=next
+
 // Tests that type alias impls traits do not leak auto-traits for
 // the purposes of coherence checking
 #![feature(type_alias_impl_trait)]