Skip to content

Commit

Permalink
Allow 'default async fn' to parse.
Browse files Browse the repository at this point in the history
  • Loading branch information
Centril committed Aug 20, 2019
1 parent 51879c3 commit 7ee4f1d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/libsyntax/parse/parser/item.rs
Expand Up @@ -825,6 +825,7 @@ impl<'a> Parser<'a> {
self.is_keyword_ahead(1, &[
kw::Impl,
kw::Const,
kw::Async,
kw::Fn,
kw::Unsafe,
kw::Extern,
Expand Down
14 changes: 14 additions & 0 deletions src/test/ui/specialization/issue-63716-parse-async.rs
@@ -0,0 +1,14 @@
// Ensure that `default async fn` will parse.
// See issue #63716 for details.

// check-pass
// edition:2018

#![feature(specialization)]

fn main() {}

#[cfg(FALSE)]
impl Foo for Bar {
default async fn baz() {}
}

0 comments on commit 7ee4f1d

Please sign in to comment.