rustc_errors: take self
by value in DiagnosticBuilder::cancel
.
This commit is contained in:
parent
8562d6b752
commit
0b9d70cf6d
31 changed files with 176 additions and 146 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue