diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-02 10:15:03 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-03 09:02:50 +1100 |
| commit | cd4c5cd8b8ca96ba1a5a48d287140a85e3984a8b (patch) | |
| tree | 390848d6887ec348efa01636d6cd8d60af1b244b | |
| parent | 6fdaf3ef7fb5ea72345520a1219ea5cc77d0f71c (diff) | |
| download | rust-cd4c5cd8b8ca96ba1a5a48d287140a85e3984a8b.tar.gz rust-cd4c5cd8b8ca96ba1a5a48d287140a85e3984a8b.zip | |
Improve a local variable name.
| -rw-r--r-- | compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs b/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs index 0a6b758efa5..5eb85d59fee 100644 --- a/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs +++ b/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs @@ -198,12 +198,12 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> { { let span = self.body.local_decls[local].source_info.span; mut_error = Some(span); - if let Some((buffer, c)) = self.get_buffered_mut_error(span) { + if let Some((buffered_err, c)) = self.get_buffered_mut_error(span) { // We've encountered a second (or more) attempt to mutably borrow an // immutable binding, so the likely problem is with the binding // declaration, not the use. We collect these in a single diagnostic // and make the binding the primary span of the error. - err = buffer; + err = buffered_err; count = c + 1; if count == 2 { err.replace_span_with(span, false); |
