diff options
Diffstat (limited to 'compiler/rustc_parse/src/parser/pat.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/pat.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/pat.rs b/compiler/rustc_parse/src/parser/pat.rs index ac3123c40e3..986a8c2b47d 100644 --- a/compiler/rustc_parse/src/parser/pat.rs +++ b/compiler/rustc_parse/src/parser/pat.rs @@ -655,7 +655,7 @@ impl<'a> Parser<'a> { fn fatal_unexpected_non_pat( &mut self, - mut err: DiagnosticBuilder<'a>, + err: DiagnosticBuilder<'a>, expected: Expected, ) -> PResult<'a, P<Pat>> { err.cancel(); @@ -722,7 +722,7 @@ impl<'a> Parser<'a> { // Ensure the user doesn't receive unhelpful unexpected token errors self.bump(); if self.is_pat_range_end_start(0) { - let _ = self.parse_pat_range_end().map_err(|mut e| e.cancel()); + let _ = self.parse_pat_range_end().map_err(|e| e.cancel()); } self.error_inclusive_range_with_extra_equals(span_with_eq); |
