Update tests

This commit is contained in:
John Kåre Alsaker 2020-02-06 10:33:05 +01:00
parent e8f0a64cf1
commit 47a84f2170
17 changed files with 224 additions and 89 deletions

View file

@ -18,22 +18,6 @@ LL | | break 0u8;
LL | | };
| |_________- enclosing `async` block
error[E0308]: mismatched types
--> $DIR/async-block-control-flow-static-semantics.rs:13:43
|
LL | fn return_targets_async_block_not_fn() -> u8 {
| --------------------------------- ^^ expected `u8`, found `()`
| |
| implicitly returns `()` as its body has no tail or `return` expression
error[E0271]: type mismatch resolving `<impl std::future::Future as std::future::Future>::Output == ()`
--> $DIR/async-block-control-flow-static-semantics.rs:18:39
|
LL | let _: &dyn Future<Output = ()> = &block;
| ^^^^^^ expected `()`, found `u8`
|
= note: required for the cast to the object type `dyn std::future::Future<Output = ()>`
error[E0308]: mismatched types
--> $DIR/async-block-control-flow-static-semantics.rs:22:58
|
@ -55,6 +39,22 @@ LL | let _: &dyn Future<Output = ()> = &block;
|
= note: required for the cast to the object type `dyn std::future::Future<Output = ()>`
error[E0308]: mismatched types
--> $DIR/async-block-control-flow-static-semantics.rs:13:43
|
LL | fn return_targets_async_block_not_fn() -> u8 {
| --------------------------------- ^^ expected `u8`, found `()`
| |
| implicitly returns `()` as its body has no tail or `return` expression
error[E0271]: type mismatch resolving `<impl std::future::Future as std::future::Future>::Output == ()`
--> $DIR/async-block-control-flow-static-semantics.rs:18:39
|
LL | let _: &dyn Future<Output = ()> = &block;
| ^^^^^^ expected `()`, found `u8`
|
= note: required for the cast to the object type `dyn std::future::Future<Output = ()>`
error[E0308]: mismatched types
--> $DIR/async-block-control-flow-static-semantics.rs:48:44
|