IsAsync -> enum Async { Yes { span: Span, .. }, No }

use new span for better diagnostics.
This commit is contained in:
Mazdak Farrokhzad 2020-01-30 05:31:04 +01:00
parent e839b2ec84
commit c30f068dc8
19 changed files with 96 additions and 108 deletions

View file

@ -2,7 +2,9 @@ error[E0706]: trait fns cannot be declared `async`
--> $DIR/fn-header-semantic-fail.rs:17:9
|
LL | async fn ft1();
| ^^^^^^^^^^^^^^^
| -----^^^^^^^^^^
| |
| `async` because of this
|
= note: `async` trait functions are not currently supported
= note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
@ -17,7 +19,9 @@ error[E0706]: trait fns cannot be declared `async`
--> $DIR/fn-header-semantic-fail.rs:21:21
|
LL | /* const */ async unsafe extern "C" fn ft5();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| `async` because of this
|
= note: `async` trait functions are not currently supported
= note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
@ -26,7 +30,9 @@ error[E0706]: trait fns cannot be declared `async`
--> $DIR/fn-header-semantic-fail.rs:28:9
|
LL | async fn ft1() {}
| ^^^^^^^^^^^^^^^^^
| -----^^^^^^^^^^^^
| |
| `async` because of this
|
= note: `async` trait functions are not currently supported
= note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
@ -41,7 +47,9 @@ error[E0706]: trait fns cannot be declared `async`
--> $DIR/fn-header-semantic-fail.rs:33:21
|
LL | /* const */ async unsafe extern "C" fn ft5() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| `async` because of this
|
= note: `async` trait functions are not currently supported
= note: consider using the `async-trait` crate: https://crates.io/crates/async-trait