about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-02-26 19:52:52 +0000
committerMichael Goulet <michael@errs.io>2024-03-01 01:20:49 +0000
commit61daee66a89f52eb5fa6f103d5ac8dbcaa885709 (patch)
tree70294ea9628babd2fb3727a65ac0ac1caf16b0a4 /tests
parent801dd1d061bc6db31547d45c64a32bbd9b4f6124 (diff)
downloadrust-61daee66a89f52eb5fa6f103d5ac8dbcaa885709.tar.gz
rust-61daee66a89f52eb5fa6f103d5ac8dbcaa885709.zip
Get rid of some sub_exp and eq_exp
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.rs6
-rw-r--r--tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.stderr6
-rw-r--r--tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.rs2
-rw-r--r--tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/itiat-allow-nested-closures.bad.stderr3
5 files changed, 11 insertions, 8 deletions
diff --git a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.rs b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.rs
index 05b167326d4..2607f047024 100644
--- a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.rs
+++ b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.rs
@@ -13,8 +13,8 @@ fn main() {
 }
 
 fn weird0() -> impl Sized + !Sized {}
-//~^ ERROR type mismatch resolving `() == impl !Sized + Sized`
+//~^ ERROR type mismatch resolving `impl !Sized + Sized == ()`
 fn weird1() -> impl !Sized + Sized {}
-//~^ ERROR type mismatch resolving `() == impl !Sized + Sized`
+//~^ ERROR type mismatch resolving `impl !Sized + Sized == ()`
 fn weird2() -> impl !Sized {}
-//~^ ERROR type mismatch resolving `() == impl !Sized`
+//~^ ERROR type mismatch resolving `impl !Sized == ()`
diff --git a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.stderr b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.stderr
index d803e56e817..ceaf42431fe 100644
--- a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.stderr
+++ b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.stderr
@@ -1,16 +1,16 @@
-error[E0271]: type mismatch resolving `() == impl !Sized + Sized`
+error[E0271]: type mismatch resolving `impl !Sized + Sized == ()`
   --> $DIR/opaque-type-unsatisfied-bound.rs:15:16
    |
 LL | fn weird0() -> impl Sized + !Sized {}
    |                ^^^^^^^^^^^^^^^^^^^ types differ
 
-error[E0271]: type mismatch resolving `() == impl !Sized + Sized`
+error[E0271]: type mismatch resolving `impl !Sized + Sized == ()`
   --> $DIR/opaque-type-unsatisfied-bound.rs:17:16
    |
 LL | fn weird1() -> impl !Sized + Sized {}
    |                ^^^^^^^^^^^^^^^^^^^ types differ
 
-error[E0271]: type mismatch resolving `() == impl !Sized`
+error[E0271]: type mismatch resolving `impl !Sized == ()`
   --> $DIR/opaque-type-unsatisfied-bound.rs:19:16
    |
 LL | fn weird2() -> impl !Sized {}
diff --git a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.rs b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.rs
index d714d781c88..9951826a846 100644
--- a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.rs
+++ b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.rs
@@ -3,6 +3,6 @@
 #![feature(negative_bounds, unboxed_closures)]
 
 fn produce() -> impl !Fn<(u32,)> {}
-//~^ ERROR type mismatch resolving `() == impl !Fn<(u32,)>`
+//~^ ERROR type mismatch resolving `impl !Fn<(u32,)> == ()`
 
 fn main() {}
diff --git a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.stderr b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.stderr
index 1fd30410b00..e1b84e0df7a 100644
--- a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.stderr
+++ b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.stderr
@@ -1,4 +1,4 @@
-error[E0271]: type mismatch resolving `() == impl !Fn<(u32,)>`
+error[E0271]: type mismatch resolving `impl !Fn<(u32,)> == ()`
   --> $DIR/opaque-type-unsatisfied-fn-bound.rs:5:17
    |
 LL | fn produce() -> impl !Fn<(u32,)> {}
diff --git a/tests/ui/type-alias-impl-trait/itiat-allow-nested-closures.bad.stderr b/tests/ui/type-alias-impl-trait/itiat-allow-nested-closures.bad.stderr
index 4acc47eaef2..9d38e8f36b1 100644
--- a/tests/ui/type-alias-impl-trait/itiat-allow-nested-closures.bad.stderr
+++ b/tests/ui/type-alias-impl-trait/itiat-allow-nested-closures.bad.stderr
@@ -8,6 +8,9 @@ LL |         let _: i32 = closure();
    |                ---   ^^^^^^^^^ expected `i32`, found opaque type
    |                |
    |                expected due to this
+   |
+   = note:     expected type `i32`
+           found opaque type `<() as Foo>::Assoc`
 
 error[E0308]: mismatched types
   --> $DIR/itiat-allow-nested-closures.rs:22:9