diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2022-03-20 18:26:09 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-03-20 20:36:08 +0100 |
| commit | 056951d6289e3fbba444cbadec8b4eea7f92928e (patch) | |
| tree | a346f55814756096537d9572dabbc264b02309ff /compiler/rustc_borrowck | |
| parent | 4767ccec935824fa5d08ce3502b233d7a66adec1 (diff) | |
| download | rust-056951d6289e3fbba444cbadec8b4eea7f92928e.tar.gz rust-056951d6289e3fbba444cbadec8b4eea7f92928e.zip | |
Take &mut Diagnostic in emit_diagnostic.
Taking a Diagnostic by move would break the usual pattern `diag.label(..).emit()`.
Diffstat (limited to 'compiler/rustc_borrowck')
| -rw-r--r-- | compiler/rustc_borrowck/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_borrowck/src/lib.rs b/compiler/rustc_borrowck/src/lib.rs index c9c973bd343..6f78c816093 100644 --- a/compiler/rustc_borrowck/src/lib.rs +++ b/compiler/rustc_borrowck/src/lib.rs @@ -2361,8 +2361,8 @@ mod error { if !self.errors.buffered.is_empty() { self.errors.buffered.sort_by_key(|diag| diag.sort_span); - for diag in self.errors.buffered.drain(..) { - self.infcx.tcx.sess.diagnostic().emit_diagnostic(&diag); + for mut diag in self.errors.buffered.drain(..) { + self.infcx.tcx.sess.diagnostic().emit_diagnostic(&mut diag); } } |
