The ungrammar for Fn suggests async
and const
are mutually exclusive, but Rust's parser allows functions that are both.
|
Fn = |
|
Attr* Visibility? |
|
'default'? ('async' | 'const')? 'unsafe'? Abi? |
|
'fn' Name GenericParamList? ParamList RetType? WhereClause? |
|
(body:BlockExpr | ';') |
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=b5513b0a15747aa6f864d4b3f2a415af