diff options
| author | Eduard-Mihai Burtescu <eddyb@lyken.rs> | 2022-01-26 03:39:14 +0000 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <eddyb@lyken.rs> | 2022-02-23 06:08:06 +0000 |
| commit | 0b9d70cf6d47df456280f83b58c04c96aa58e89e (patch) | |
| tree | ade43c09a3ffb7bad3aab2f031dec6ebc4e292a2 /compiler/rustc_parse/src/parser/path.rs | |
| parent | 8562d6b7523b498f731f78dd740d0bc612983ffc (diff) | |
| download | rust-0b9d70cf6d47df456280f83b58c04c96aa58e89e.tar.gz rust-0b9d70cf6d47df456280f83b58c04c96aa58e89e.zip | |
rustc_errors: take `self` by value in `DiagnosticBuilder::cancel`.
Diffstat (limited to 'compiler/rustc_parse/src/parser/path.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/path.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/path.rs b/compiler/rustc_parse/src/parser/path.rs index 48502112e3a..b5857e05970 100644 --- a/compiler/rustc_parse/src/parser/path.rs +++ b/compiler/rustc_parse/src/parser/path.rs @@ -394,7 +394,7 @@ impl<'a> Parser<'a> { debug!("parse_generic_args_with_leading_angle_bracket_recovery: (snapshotting)"); match self.parse_angle_args(ty_generics) { Ok(args) => Ok(args), - Err(mut e) if is_first_invocation && self.unmatched_angle_bracket_count > 0 => { + Err(e) if is_first_invocation && self.unmatched_angle_bracket_count > 0 => { // Swap `self` with our backup of the parser state before attempting to parse // generic arguments. let snapshot = mem::replace(self, snapshot.unwrap()); |
