macros: run runtime inside LocalSet when using macro (#4027)

This commit is contained in:
Ben Noordhuis
2021-09-15 11:25:02 +02:00
committed by GitHub
parent 4c9b469562
commit 33f0a1fd2e
4 changed files with 51 additions and 34 deletions
@@ -1,8 +1,8 @@
error[E0308]: mismatched types
--> $DIR/macros_type_mismatch.rs:5:5
--> $DIR/macros_type_mismatch.rs:5:7
|
5 | Ok(())
| ^^^^^^ expected `()`, found enum `Result`
| ^^^^ expected `()`, found enum `Result`
|
= note: expected unit type `()`
found enum `Result<(), _>`
@@ -16,12 +16,12 @@ help: try adding a return type
| ^^^^^^^^^^^^^^^^
error[E0308]: mismatched types
--> $DIR/macros_type_mismatch.rs:10:5
--> $DIR/macros_type_mismatch.rs:10:18
|
9 | async fn missing_return_type() {
| - help: try adding a return type: `-> Result<(), _>`
10 | return Ok(());
| ^^^^^^^^^^^^^^ expected `()`, found enum `Result`
| ^ expected `()`, found enum `Result`
|
= note: expected unit type `()`
found enum `Result<(), _>`