Allow 'default async fn' to parse.
This commit is contained in:
parent
51879c3aba
commit
7ee4f1da8c
2 changed files with 15 additions and 0 deletions
|
@ -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,
|
||||
|
|
14
src/test/ui/specialization/issue-63716-parse-async.rs
Normal file
14
src/test/ui/specialization/issue-63716-parse-async.rs
Normal file
|
@ -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() {}
|
||||
}
|
Loading…
Add table
Reference in a new issue