diff --git a/src/expr.rs b/src/expr.rs index a2e47d31b4..67ccc7773e 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -904,7 +904,7 @@ impl Expr { #[cfg(feature = "parsing")] #[cfg_attr(docsrs, doc(cfg(feature = "parsing")))] pub fn peek(input: ParseStream) -> bool { - input.peek(Ident::peek_any) // value name or keyword + input.peek(Ident::peek_any) && !input.peek(Token![as]) // value name or keyword || input.peek(token::Paren) // tuple || input.peek(token::Bracket) // array || input.peek(token::Brace) // block