Get rid of some sub_exp and eq_exp

This commit is contained in:
Michael Goulet 2024-02-26 19:52:52 +00:00
parent 801dd1d061
commit 61daee66a8
12 changed files with 48 additions and 60 deletions

View file

@ -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 == ()`

View file

@ -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 {}

View file

@ -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() {}

View file

@ -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,)> {}

View file

@ -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