about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-05-31 01:39:20 +0000
committerMichael Goulet <michael@errs.io>2023-06-06 18:43:20 +0000
commitaabdeedc7c812388b30575a5f53292128f4f7464 (patch)
tree555fa20756158000b645d964a36ee33bcedecc73
parent3d4da98273553b2307d8ce3a03c476e459aa3f45 (diff)
downloadrust-aabdeedc7c812388b30575a5f53292128f4f7464.tar.gz
rust-aabdeedc7c812388b30575a5f53292128f4f7464.zip
bless coherence test
-rw-r--r--tests/ui/specialization/specialization-default-items-drop-coherence.coherence.stderr12
-rw-r--r--tests/ui/specialization/specialization-default-items-drop-coherence.next.stderr12
-rw-r--r--tests/ui/specialization/specialization-default-items-drop-coherence.rs9
3 files changed, 31 insertions, 2 deletions
diff --git a/tests/ui/specialization/specialization-default-items-drop-coherence.coherence.stderr b/tests/ui/specialization/specialization-default-items-drop-coherence.coherence.stderr
new file mode 100644
index 00000000000..578db0cc65e
--- /dev/null
+++ b/tests/ui/specialization/specialization-default-items-drop-coherence.coherence.stderr
@@ -0,0 +1,12 @@
+error[E0119]: conflicting implementations of trait `Overlap` for type `u32`
+  --> $DIR/specialization-default-items-drop-coherence.rs:29:1
+   |
+LL | impl Overlap for u32 {
+   | -------------------- first implementation here
+...
+LL | impl Overlap for <u32 as Default>::Id {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `u32`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/specialization/specialization-default-items-drop-coherence.next.stderr b/tests/ui/specialization/specialization-default-items-drop-coherence.next.stderr
new file mode 100644
index 00000000000..578db0cc65e
--- /dev/null
+++ b/tests/ui/specialization/specialization-default-items-drop-coherence.next.stderr
@@ -0,0 +1,12 @@
+error[E0119]: conflicting implementations of trait `Overlap` for type `u32`
+  --> $DIR/specialization-default-items-drop-coherence.rs:29:1
+   |
+LL | impl Overlap for u32 {
+   | -------------------- first implementation here
+...
+LL | impl Overlap for <u32 as Default>::Id {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `u32`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/specialization/specialization-default-items-drop-coherence.rs b/tests/ui/specialization/specialization-default-items-drop-coherence.rs
index 16ad942d5ab..44c598f19cb 100644
--- a/tests/ui/specialization/specialization-default-items-drop-coherence.rs
+++ b/tests/ui/specialization/specialization-default-items-drop-coherence.rs
@@ -1,5 +1,8 @@
-// check-pass
-// known-bug: #105782
+// revisions: classic coherence next
+//[next] compile-flags: -Ztrait-solver=next
+//[coherence] compile-flags: -Ztrait-solver=next-coherence
+//[classic] check-pass
+//[classic] known-bug: #105782
 
 // Should fail. Default items completely drop candidates instead of ambiguity,
 // which is unsound during coherence, since coherence requires completeness.
@@ -24,6 +27,8 @@ impl Overlap for u32 {
 }
 
 impl Overlap for <u32 as Default>::Id {
+   //[coherence]~^ ERROR conflicting implementations of trait `Overlap` for type `u32`
+   //[next]~^^ ERROR conflicting implementations of trait `Overlap` for type `u32`
    type Assoc = Box<usize>;
 }