Skip to content

Commit

Permalink
Merge pull request #1215 from dtolnay/staticasync
Browse files Browse the repository at this point in the history
Parse 'static async' closures
  • Loading branch information
dtolnay committed Sep 18, 2022
2 parents 2de2d8c + aa4fa70 commit 3e09e3b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/stmt.rs
Expand Up @@ -175,7 +175,11 @@ pub mod parsing {
|| input.peek(Token![crate]) && !input.peek2(Token![::])
|| input.peek(Token![extern])
|| input.peek(Token![use])
|| input.peek(Token![static]) && (input.peek2(Token![mut]) || input.peek2(Ident))
|| input.peek(Token![static])
&& (input.peek2(Token![mut])
|| input.peek2(Ident)
&& !(input.peek2(Token![async])
&& (input.peek3(Token![move]) || input.peek3(Token![|]))))
|| input.peek(Token![const]) && !input.peek2(token::Brace)
|| input.peek(Token![unsafe]) && !input.peek2(token::Brace)
|| input.peek(Token![async])
Expand Down
3 changes: 0 additions & 3 deletions tests/repo/mod.rs
Expand Up @@ -14,9 +14,6 @@ const REVISION: &str = "98ad6a5519651af36e246c0335c964dd52c554ba";

#[rustfmt::skip]
static EXCLUDE_FILES: &[&str] = &[
// TODO: static async closures, for<> move closures
"src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0106_lambda_expr.rs",

// TODO: generic associated type constraint inside trait bound
"src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0138_associated_type_bounds.rs",

Expand Down

0 comments on commit 3e09e3b

Please sign in to comment.