Skip to content

Commit 41e85c3

Browse files
committed
Apply suggestions
1 parent f5243d2 commit 41e85c3

File tree

1 file changed

+4
-2
lines changed
  • compiler/rustc_parse/src/parser

1 file changed

+4
-2
lines changed

compiler/rustc_parse/src/parser/pat.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ impl<'a> Parser<'a> {
139139
};
140140

141141
// Parse the first pattern (`p_0`).
142-
let mut first_pat = self.parse_pat_no_top_alt(expected, syntax_loc.clone())?;
142+
let mut first_pat = self.parse_pat_no_top_alt(expected, syntax_loc)?;
143143
if rc == RecoverComma::Yes {
144144
self.maybe_recover_unexpected_comma(first_pat.span, rt)?;
145145
}
@@ -813,7 +813,9 @@ impl<'a> Parser<'a> {
813813
| token::DotDotDot | token::DotDotEq | token::DotDot // A range pattern.
814814
| token::ModSep // A tuple / struct variant pattern.
815815
| token::Not)) // A macro expanding to a pattern.
816-
&& !(self.look_ahead(1, |t| t.kind == token::Lt) && self.look_ahead(2, |t| t.can_begin_type())) // May suggest the turbofish syntax for generics, only valid for recoveries.
816+
// May suggest the turbofish syntax for generics, only valid for recoveries.
817+
&& !(self.look_ahead(1, |t| t.kind == token::Lt)
818+
&& self.look_ahead(2, |t| t.can_begin_type()))
817819
}
818820

819821
/// Parses `ident` or `ident @ pat`.

0 commit comments

Comments
 (0)