about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2020-01-30 05:31:04 +0100
committerMazdak Farrokhzad <twingoow@gmail.com>2020-02-13 10:39:24 +0100
commitc30f068dc8b2ef58678b9846ba834dd6dea3fe44 (patch)
tree82e59f521573df949dda750e7f1aa31588205b7d /src/test
parente839b2ec849246ec5efe5069c8d874dbef289462 (diff)
downloadrust-c30f068dc8b2ef58678b9846ba834dd6dea3fe44.tar.gz
rust-c30f068dc8b2ef58678b9846ba834dd6dea3fe44.zip
IsAsync -> enum Async { Yes { span: Span, .. }, No }
use new span for better diagnostics.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui-fulldeps/pprust-expr-roundtrip.rs2
-rw-r--r--src/test/ui/async-await/async-trait-fn.stderr8
-rw-r--r--src/test/ui/async-await/edition-deny-async-fns-2015.stderr4
-rw-r--r--src/test/ui/parser/fn-header-semantic-fail.stderr16
4 files changed, 22 insertions, 8 deletions
diff --git a/src/test/ui-fulldeps/pprust-expr-roundtrip.rs b/src/test/ui-fulldeps/pprust-expr-roundtrip.rs
index 0f6a88b2691..7ac75c605f2 100644
--- a/src/test/ui-fulldeps/pprust-expr-roundtrip.rs
+++ b/src/test/ui-fulldeps/pprust-expr-roundtrip.rs
@@ -121,7 +121,7 @@ fn iter_exprs(depth: usize, f: &mut dyn FnMut(P<Expr>)) {
                 });
                 iter_exprs(depth - 1, &mut |e| g(
                         ExprKind::Closure(CaptureBy::Value,
-                                          IsAsync::NotAsync,
+                                          Async::No,
                                           Movability::Movable,
                                           decl.clone(),
                                           e,
diff --git a/src/test/ui/async-await/async-trait-fn.stderr b/src/test/ui/async-await/async-trait-fn.stderr
index 9acfa2cc069..04f72fb645e 100644
--- a/src/test/ui/async-await/async-trait-fn.stderr
+++ b/src/test/ui/async-await/async-trait-fn.stderr
@@ -2,7 +2,9 @@ error[E0706]: trait fns cannot be declared `async`
   --> $DIR/async-trait-fn.rs:3:5
    |
 LL |     async fn foo() {}
-   |     ^^^^^^^^^^^^^^^^^
+   |     -----^^^^^^^^^^^^
+   |     |
+   |     `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
@@ -11,7 +13,9 @@ error[E0706]: trait fns cannot be declared `async`
   --> $DIR/async-trait-fn.rs:4:5
    |
 LL |     async fn bar(&self) {}
-   |     ^^^^^^^^^^^^^^^^^^^^^^
+   |     -----^^^^^^^^^^^^^^^^^
+   |     |
+   |     `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
diff --git a/src/test/ui/async-await/edition-deny-async-fns-2015.stderr b/src/test/ui/async-await/edition-deny-async-fns-2015.stderr
index bb09ee9a932..e6859a3cd93 100644
--- a/src/test/ui/async-await/edition-deny-async-fns-2015.stderr
+++ b/src/test/ui/async-await/edition-deny-async-fns-2015.stderr
@@ -56,7 +56,9 @@ error[E0706]: trait fns cannot be declared `async`
   --> $DIR/edition-deny-async-fns-2015.rs:18:5
    |
 LL |     async fn foo() {}
-   |     ^^^^^^^^^^^^^^^^^
+   |     -----^^^^^^^^^^^^
+   |     |
+   |     `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
diff --git a/src/test/ui/parser/fn-header-semantic-fail.stderr b/src/test/ui/parser/fn-header-semantic-fail.stderr
index 41d2d9b7faa..689bbdd8bab 100644
--- a/src/test/ui/parser/fn-header-semantic-fail.stderr
+++ b/src/test/ui/parser/fn-header-semantic-fail.stderr
@@ -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