Deny async fn in 2015 edition

Fix style issues and update diagnostic messages

Update src/librustc_passes/diagnostics.rs

Co-Authored-By: doctorn <me@nathancorbyn.com>

Deny nested `async fn` in Rust 2015 edition

Deny nested `async fn` in Rust 2015 edition

Deny nested `async fn` in Rust 2015 edition
This commit is contained in:
Nathan Corbyn
2019-02-23 18:39:27 +00:00
parent 7f19f161f2
commit 8300f51936
22 changed files with 215 additions and 62 deletions

View File

@@ -257,7 +257,7 @@ fn has_test_signature(cx: &ExtCtxt<'_>, i: &ast::Item) -> bool {
);
return false
}
if header.asyncness.is_async() {
if header.asyncness.node.is_async() {
sd.span_err(
i.span,
"async functions cannot be used for tests"