Skip to content

Commit

Permalink
Name the expr_style argument at all call sites of path::parsing::qpath
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Aug 16, 2024
1 parent b15ae28 commit 5dbfeae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1853,7 +1853,8 @@ pub(crate) mod parsing {
input: ParseStream,
#[cfg(feature = "full")] allow_struct: AllowStruct,
) -> Result<Expr> {
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,
Expand Down Expand Up @@ -2684,7 +2685,8 @@ pub(crate) mod parsing {
#[cfg_attr(docsrs, doc(cfg(feature = "parsing")))]
impl Parse for ExprStruct {
fn parse(input: ParseStream) -> Result<Self> {
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)
}
}
Expand Down Expand Up @@ -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 })
}
Expand Down
3 changes: 2 additions & 1 deletion src/pat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,8 @@ pub(crate) mod parsing {
}

fn pat_path_or_macro_or_struct_or_range(input: ParseStream) -> Result<Pat> {
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![!])
Expand Down

0 comments on commit 5dbfeae

Please sign in to comment.