diff options
| author | Andy Weiss <dragonbear@google.com> | 2020-09-09 15:16:34 -0700 |
|---|---|---|
| committer | Andy Weiss <dragonbear@google.com> | 2020-09-22 13:22:10 -0700 |
| commit | 5b475a46181cc4e8bfe2ac64f3724a5c485d6c5c (patch) | |
| tree | c14392e4936b7f78d308ecde758fa0a9b0ced8d1 /src/test/ui/parser | |
| parent | 25b2f4861222d6507598149f576e7d25dc308c8c (diff) | |
| download | rust-5b475a46181cc4e8bfe2ac64f3724a5c485d6c5c.tar.gz rust-5b475a46181cc4e8bfe2ac64f3724a5c485d6c5c.zip | |
Suggest async {} for async || {}
Fixes #76011 This adds support for adding help diagnostics to the feature gating checks and then uses it for the async_closure gate to add the extra bit of help information as described in the issue.
Diffstat (limited to 'src/test/ui/parser')
| -rw-r--r-- | src/test/ui/parser/block-no-opening-brace.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/parser/block-no-opening-brace.stderr | 12 |
2 files changed, 2 insertions, 12 deletions
diff --git a/src/test/ui/parser/block-no-opening-brace.rs b/src/test/ui/parser/block-no-opening-brace.rs index e4bb39f6836..8a6599488b1 100644 --- a/src/test/ui/parser/block-no-opening-brace.rs +++ b/src/test/ui/parser/block-no-opening-brace.rs @@ -26,6 +26,6 @@ fn f4() { } fn f5() { - async //~ ERROR async closures are unstable + async let x = 0; //~ ERROR expected one of `move`, `|`, or `||`, found keyword `let` } diff --git a/src/test/ui/parser/block-no-opening-brace.stderr b/src/test/ui/parser/block-no-opening-brace.stderr index a88e4ac44cf..e32c8bdc73a 100644 --- a/src/test/ui/parser/block-no-opening-brace.stderr +++ b/src/test/ui/parser/block-no-opening-brace.stderr @@ -39,15 +39,5 @@ LL | async LL | let x = 0; | ^^^ unexpected token -error[E0658]: async closures are unstable - --> $DIR/block-no-opening-brace.rs:29:5 - | -LL | async - | ^^^^^ - | - = note: see issue #62290 <https://github.com/rust-lang/rust/issues/62290> for more information - = help: add `#![feature(async_closure)]` to the crate attributes to enable - -error: aborting due to 6 previous errors +error: aborting due to 5 previous errors -For more information about this error, try `rustc --explain E0658`. |
