about summary refs log tree commit diff
path: root/src/libsyntax/print
diff options
context:
space:
mode:
authorNathan Corbyn <me@nathancorbyn.com>2019-02-23 18:39:27 +0000
committerNathan Corbyn <me@nathancorbyn.com>2019-02-24 16:33:12 +0000
commit8300f51936149ec43eb063205e4d03c54a308f3c (patch)
treefa722c6f5a1cb29ffaec3477aa6b7b18d79e9660 /src/libsyntax/print
parent7f19f161f24c9a02ff8c3f73122d0b015039221f (diff)
downloadrust-8300f51936149ec43eb063205e4d03c54a308f3c.tar.gz
rust-8300f51936149ec43eb063205e4d03c54a308f3c.zip
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
Diffstat (limited to 'src/libsyntax/print')
-rw-r--r--src/libsyntax/print/pprust.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index dcf9815f6d1..d6265ebde1b 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -3195,7 +3195,7 @@ impl<'a> State<'a> {
             ast::Constness::Const => self.word_nbsp("const")?
         }
 
-        self.print_asyncness(header.asyncness)?;
+        self.print_asyncness(header.asyncness.node)?;
         self.print_unsafety(header.unsafety)?;
 
         if header.abi != Abi::Rust {
@@ -3247,7 +3247,7 @@ mod tests {
                     ast::FnHeader {
                         unsafety: ast::Unsafety::Normal,
                         constness: source_map::dummy_spanned(ast::Constness::NotConst),
-                        asyncness: ast::IsAsync::NotAsync,
+                        asyncness: source_map::dummy_spanned(ast::IsAsync::NotAsync),
                         abi: Abi::Rust,
                     },
                     abba_ident,