review comments
This commit is contained in:
parent
9c0000caca
commit
c55615155d
14 changed files with 54 additions and 34 deletions
|
|
@ -2,7 +2,7 @@ error[E0308]: mismatched types
|
|||
--> $DIR/dont-suggest-missing-await.rs:14:18
|
||||
|
|
||||
LL | async fn make_u32() -> u32 {
|
||||
| --- in the desugared `async fn`, this is the found opaque type
|
||||
| --- the found opaque type in the `Output` of this `async fn`
|
||||
...
|
||||
LL | take_u32(x)
|
||||
| ^ expected `u32`, found opaque type
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error[E0308]: mismatched types
|
|||
--> $DIR/suggest-missing-await-closure.rs:16:18
|
||||
|
|
||||
LL | async fn make_u32() -> u32 {
|
||||
| --- in the desugared `async fn`, this is the found opaque type
|
||||
| --- the found opaque type in the `Output` of this `async fn`
|
||||
...
|
||||
LL | take_u32(x)
|
||||
| ^
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error[E0308]: mismatched types
|
|||
--> $DIR/suggest-missing-await.rs:13:14
|
||||
|
|
||||
LL | async fn make_u32() -> u32 {
|
||||
| --- in the desugared `async fn`, this is the found opaque type
|
||||
| --- the found opaque type in the `Output` of this `async fn`
|
||||
...
|
||||
LL | take_u32(x)
|
||||
| ^
|
||||
|
|
@ -16,6 +16,9 @@ LL | take_u32(x)
|
|||
error[E0308]: mismatched types
|
||||
--> $DIR/suggest-missing-await.rs:23:5
|
||||
|
|
||||
LL | async fn dummy() {}
|
||||
| - the found opaque type in the `Output` of this `async fn`
|
||||
...
|
||||
LL | dummy()
|
||||
| ^^^^^^^ expected `()`, found opaque type
|
||||
|
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error[E0308]: mismatched types
|
|||
--> $DIR/closure-reform-bad.rs:11:15
|
||||
|
|
||||
LL | let f = |s: &str| println!("{}{}", s, string);
|
||||
| ------------------------------------- this is the found closure
|
||||
| ------------------------------------- the found closure
|
||||
LL | call_bare(f)
|
||||
| ^ expected fn pointer, found closure
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
error[E0308]: mismatched types
|
||||
--> $DIR/extern-types-distinct-types.rs:9:5
|
||||
|
|
||||
LL | type A;
|
||||
| ------- the found foreign type
|
||||
LL | type B;
|
||||
| ------- the expected foreign type
|
||||
...
|
||||
LL | r
|
||||
| ^ expected extern type `B`, found extern type `A`
|
||||
|
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error[E0308]: mismatched types
|
|||
--> $DIR/equality2.rs:25:18
|
||||
|
|
||||
LL | fn hide<T: Foo>(x: T) -> impl Foo {
|
||||
| -------- this is the found opaque type
|
||||
| -------- the found opaque type
|
||||
...
|
||||
LL | let _: u32 = hide(0_u32);
|
||||
| --- ^^^^^^^^^^^ expected `u32`, found opaque type
|
||||
|
|
@ -16,7 +16,7 @@ error[E0308]: mismatched types
|
|||
--> $DIR/equality2.rs:31:18
|
||||
|
|
||||
LL | fn hide<T: Foo>(x: T) -> impl Foo {
|
||||
| -------- this is the found opaque type
|
||||
| -------- the found opaque type
|
||||
...
|
||||
LL | let _: i32 = Leak::leak(hide(0_i32));
|
||||
| --- ^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found associated type
|
||||
|
|
@ -32,7 +32,10 @@ error[E0308]: mismatched types
|
|||
--> $DIR/equality2.rs:38:10
|
||||
|
|
||||
LL | fn hide<T: Foo>(x: T) -> impl Foo {
|
||||
| -------- this is the expected opaque type
|
||||
| --------
|
||||
| |
|
||||
| the expected opaque type
|
||||
| the found opaque type
|
||||
...
|
||||
LL | x = (x.1,
|
||||
| ^^^ expected `u32`, found `i32`
|
||||
|
|
@ -44,7 +47,10 @@ error[E0308]: mismatched types
|
|||
--> $DIR/equality2.rs:41:10
|
||||
|
|
||||
LL | fn hide<T: Foo>(x: T) -> impl Foo {
|
||||
| -------- this is the expected opaque type
|
||||
| --------
|
||||
| |
|
||||
| the expected opaque type
|
||||
| the found opaque type
|
||||
...
|
||||
LL | x.0);
|
||||
| ^^^ expected `i32`, found `u32`
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error[E0308]: mismatched types
|
|||
--> $DIR/issue-24036.rs:3:9
|
||||
|
|
||||
LL | let mut x = |c| c + 1;
|
||||
| --------- this is the expected closure
|
||||
| --------- the expected closure
|
||||
LL | x = |c| c + 1;
|
||||
| ^^^^^^^^^ expected closure, found a different closure
|
||||
|
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ error[E0308]: mismatched types
|
|||
--> $DIR/fn-or-tuple-struct-without-args.rs:46:20
|
||||
|
|
||||
LL | let closure = || 42;
|
||||
| ----- this is the found closure
|
||||
| ----- the found closure
|
||||
LL | let _: usize = closure;
|
||||
| ----- ^^^^^^^
|
||||
| | |
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error[E0308]: `if` and `else` have incompatible types
|
|||
--> $DIR/opaque-type-error.rs:20:9
|
||||
|
|
||||
LL | fn thing_two() -> impl Future<Output = Result<(), ()>> {
|
||||
| ------------------------------------ this is the found opaque type
|
||||
| ------------------------------------ the found opaque type
|
||||
...
|
||||
LL | / if true {
|
||||
LL | | thing_one()
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ LL | let z: i32 = x;
|
|||
| expected due to this
|
||||
...
|
||||
LL | type WrongGeneric<T> = impl 'static;
|
||||
| ------------------------------------ this is the found opaque type
|
||||
| ------------------------------------ the found opaque type
|
||||
|
|
||||
= note: expected type `i32`
|
||||
found opaque type `WrongGeneric::<&{integer}>`
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ LL | let z: i32 = x;
|
|||
| expected due to this
|
||||
...
|
||||
LL | type WrongGeneric<T> = impl 'static;
|
||||
| ------------------------------------ this is the found opaque type
|
||||
| ------------------------------------ the found opaque type
|
||||
|
|
||||
= note: expected type `i32`
|
||||
found opaque type `WrongGeneric::<&{integer}>`
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error[E0308]: mismatched types
|
|||
--> $DIR/never_reveal_concrete_type.rs:13:27
|
||||
|
|
||||
LL | type NoReveal = impl std::fmt::Debug;
|
||||
| ------------------------------------- this is the found opaque type
|
||||
| ------------------------------------- the found opaque type
|
||||
...
|
||||
LL | let _: &'static str = x;
|
||||
| ------------ ^ expected `&str`, found opaque type
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error[E0308]: mismatched types
|
|||
--> $DIR/no_revealing_outside_defining_module.rs:15:19
|
||||
|
|
||||
LL | pub type Boo = impl ::std::fmt::Debug;
|
||||
| -------------------------------------- this is the found opaque type
|
||||
| -------------------------------------- the found opaque type
|
||||
...
|
||||
LL | let _: &str = bomp();
|
||||
| ---- ^^^^^^ expected `&str`, found opaque type
|
||||
|
|
@ -16,7 +16,7 @@ error[E0308]: mismatched types
|
|||
--> $DIR/no_revealing_outside_defining_module.rs:19:5
|
||||
|
|
||||
LL | pub type Boo = impl ::std::fmt::Debug;
|
||||
| -------------------------------------- this is the expected opaque type
|
||||
| -------------------------------------- the expected opaque type
|
||||
...
|
||||
LL | fn bomp() -> boo::Boo {
|
||||
| -------- expected `Boo` because of return type
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue