Fix incorrect diagnostics for expected type in E0271 with an associated type
This commit is contained in:
parent
c553e8e881
commit
8bb5450128
11 changed files with 64 additions and 51 deletions
|
@ -33,10 +33,10 @@ error[E0271]: type mismatch resolving `<impl std::future::Future as std::future:
|
|||
--> $DIR/async-block-control-flow-static-semantics.rs:18:39
|
||||
|
|
||||
LL | let _: &dyn Future<Output = ()> = █
|
||||
| ^^^^^^ expected u8, found ()
|
||||
| ^^^^^^ expected (), found u8
|
||||
|
|
||||
= note: expected type `u8`
|
||||
found type `()`
|
||||
= note: expected type `()`
|
||||
found type `u8`
|
||||
= note: required for the cast to the object type `dyn std::future::Future<Output = ()>`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
|
@ -59,10 +59,10 @@ error[E0271]: type mismatch resolving `<impl std::future::Future as std::future:
|
|||
--> $DIR/async-block-control-flow-static-semantics.rs:27:39
|
||||
|
|
||||
LL | let _: &dyn Future<Output = ()> = █
|
||||
| ^^^^^^ expected u8, found ()
|
||||
| ^^^^^^ expected (), found u8
|
||||
|
|
||||
= note: expected type `u8`
|
||||
found type `()`
|
||||
= note: expected type `()`
|
||||
found type `u8`
|
||||
= note: required for the cast to the object type `dyn std::future::Future<Output = ()>`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue