From 5dbfeae027d3d5356289bbd37f5daede30a838cc Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Thu, 15 Aug 2024 17:43:50 -0700 Subject: [PATCH] Name the expr_style argument at all call sites of path::parsing::qpath --- src/expr.rs | 9 ++++++--- src/pat.rs | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/expr.rs b/src/expr.rs index 8e1e461d8e..e7b462c0ee 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -1853,7 +1853,8 @@ pub(crate) mod parsing { input: ParseStream, #[cfg(feature = "full")] allow_struct: AllowStruct, ) -> Result { - let (qself, path) = path::parsing::qpath(input, true)?; + let expr_style = true; + let (qself, path) = path::parsing::qpath(input, expr_style)?; rest_of_path_or_macro_or_struct( qself, path, @@ -2684,7 +2685,8 @@ pub(crate) mod parsing { #[cfg_attr(docsrs, doc(cfg(feature = "parsing")))] impl Parse for ExprStruct { fn parse(input: ParseStream) -> Result { - let (qself, path) = path::parsing::qpath(input, true)?; + let expr_style = true; + let (qself, path) = path::parsing::qpath(input, expr_style)?; expr_struct_helper(input, qself, path) } } @@ -2851,7 +2853,8 @@ pub(crate) mod parsing { #[cfg(feature = "full")] let attrs = input.call(Attribute::parse_outer)?; - let (qself, path) = path::parsing::qpath(input, true)?; + let expr_style = true; + let (qself, path) = path::parsing::qpath(input, expr_style)?; Ok(ExprPath { attrs, qself, path }) } diff --git a/src/pat.rs b/src/pat.rs index e647f2f4d0..07849c04b9 100644 --- a/src/pat.rs +++ b/src/pat.rs @@ -417,7 +417,8 @@ pub(crate) mod parsing { } fn pat_path_or_macro_or_struct_or_range(input: ParseStream) -> Result { - let (qself, path) = path::parsing::qpath(input, true)?; + let expr_style = true; + let (qself, path) = path::parsing::qpath(input, expr_style)?; if qself.is_none() && input.peek(Token![!])