Skip to content

Commit 67e39ed

Browse files
authored
Rollup merge of rust-lang#63759 - Centril:parse-default-async-fn, r=petrochenkov
Allow 'default async fn' to parse. - Parse default async fn. Fixes rust-lang#63716. (`cherry-pick`ed from 3rd commit in rust-lang#63749.) r? @petrochenkov
2 parents b655674 + 7ee4f1d commit 67e39ed

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/libsyntax/parse/parser/item.rs

+1
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,7 @@ impl<'a> Parser<'a> {
825825
self.is_keyword_ahead(1, &[
826826
kw::Impl,
827827
kw::Const,
828+
kw::Async,
828829
kw::Fn,
829830
kw::Unsafe,
830831
kw::Extern,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Ensure that `default async fn` will parse.
2+
// See issue #63716 for details.
3+
4+
// check-pass
5+
// edition:2018
6+
7+
#![feature(specialization)]
8+
9+
fn main() {}
10+
11+
#[cfg(FALSE)]
12+
impl Foo for Bar {
13+
default async fn baz() {}
14+
}

0 commit comments

Comments
 (0)