]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/async-await/async-block-control-flow-static-semantics.stderr
Remove E0308 note when primary label has all info
[rust.git] / src / test / ui / async-await / async-block-control-flow-static-semantics.stderr
index 6bef9dca265e72cbfebed5123b1969fa46dfde92..212558cf9328ed56166aac99593d11086b2b2c39 100644 (file)
@@ -25,9 +25,6 @@ LL | fn return_targets_async_block_not_fn() -> u8 {
    |    ---------------------------------      ^^ expected u8, found ()
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
-   |
-   = note: expected type `u8`
-              found type `()`
 
 error[E0271]: type mismatch resolving `<impl std::future::Future as std::future::Future>::Output == ()`
   --> $DIR/async-block-control-flow-static-semantics.rs:18:39
@@ -35,8 +32,6 @@ error[E0271]: type mismatch resolving `<impl std::future::Future as std::future:
 LL |     let _: &dyn Future<Output = ()> = &block;
    |                                       ^^^^^^ expected (), found u8
    |
-   = note: expected type `()`
-              found type `u8`
    = note: required for the cast to the object type `dyn std::future::Future<Output = ()>`
 
 error[E0308]: mismatched types
@@ -51,9 +46,6 @@ LL | |         return 0u8;
 LL | |
 LL | | }
    | |_^ expected u8, found ()
-   |
-   = note: expected type `u8`
-              found type `()`
 
 error[E0271]: type mismatch resolving `<impl std::future::Future as std::future::Future>::Output == ()`
   --> $DIR/async-block-control-flow-static-semantics.rs:27:39
@@ -61,8 +53,6 @@ error[E0271]: type mismatch resolving `<impl std::future::Future as std::future:
 LL |     let _: &dyn Future<Output = ()> = &block;
    |                                       ^^^^^^ expected (), found u8
    |
-   = note: expected type `()`
-              found type `u8`
    = note: required for the cast to the object type `dyn std::future::Future<Output = ()>`
 
 error[E0308]: mismatched types
@@ -73,8 +63,8 @@ LL | fn rethrow_targets_async_block_not_fn() -> Result<u8, MyErr> {
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
    |
-   = note: expected type `std::result::Result<u8, MyErr>`
-              found type `()`
+   = note:   expected enum `std::result::Result<u8, MyErr>`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/async-block-control-flow-static-semantics.rs:57:50
@@ -84,8 +74,8 @@ LL | fn rethrow_targets_async_block_not_async_fn() -> Result<u8, MyErr> {
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
    |
-   = note: expected type `std::result::Result<u8, MyErr>`
-              found type `()`
+   = note:   expected enum `std::result::Result<u8, MyErr>`
+           found unit type `()`
 
 error: aborting due to 8 previous errors