Skip to content

Commit

Permalink
Fix parsing of x.0. await
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Mar 14, 2023
1 parent 6032918 commit f8ec4f9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
14 changes: 7 additions & 7 deletions src/expr.rs
Expand Up @@ -1439,6 +1439,13 @@ pub(crate) mod parsing {
{
let mut dot_token: Token![.] = input.parse()?;

let float_token: Option<LitFloat> = input.parse()?;
if let Some(float_token) = float_token {
if multi_index(&mut e, &mut dot_token, float_token)? {
continue;
}
}

let await_token: Option<Token![await]> = input.parse()?;
if let Some(await_token) = await_token {
e = Expr::Await(ExprAwait {
Expand All @@ -1450,13 +1457,6 @@ pub(crate) mod parsing {
continue;
}

let float_token: Option<LitFloat> = input.parse()?;
if let Some(float_token) = float_token {
if multi_index(&mut e, &mut dot_token, float_token)? {
continue;
}
}

let member: Member = input.parse()?;
let turbofish = if member.is_named() && input.peek(Token![::]) {
Some(AngleBracketedGenericArguments::parse_turbofish(input)?)
Expand Down
3 changes: 0 additions & 3 deletions tests/repo/mod.rs
Expand Up @@ -14,9 +14,6 @@ const REVISION: &str = "22f247c6f3ed388cb702d01c2ff27da658a8b353";

#[rustfmt::skip]
static EXCLUDE_FILES: &[&str] = &[
// TODO: `x.0. await`
"src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0137_await_expr.rs",

// TODO: `const move || {}`
"tests/ui/rfc-2632-const-trait-impl/const-closure-parse-not-item.rs",

Expand Down

0 comments on commit f8ec4f9

Please sign in to comment.