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 | 94c727eccf0d8befe27aca4050cbb880a6e0343b (patch) | |
| tree | 4490c853a95a35fb521d50a6563e7aa3ad275d17 | |
| parent | 1f069c0ce7a2b0f48a9bae66fb201f4955836762 (diff) | |
| download | rust-94c727eccf0d8befe27aca4050cbb880a6e0343b.tar.gz rust-94c727eccf0d8befe27aca4050cbb880a6e0343b.zip | |
Take &mut Diagnostic in emit_diagnostic.
Taking a Diagnostic by move would break the usual pattern `diag.label(..).emit()`.
| -rw-r--r-- | src/driver.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/driver.rs b/src/driver.rs index 8f8f1140a3d..855a6a6ef6a 100644 --- a/src/driver.rs +++ b/src/driver.rs @@ -178,8 +178,8 @@ fn report_clippy_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str) { // a .span_bug or .bug call has already printed what // it wants to print. if !info.payload().is::<rustc_errors::ExplicitBug>() { - let d = rustc_errors::Diagnostic::new(rustc_errors::Level::Bug, "unexpected panic"); - handler.emit_diagnostic(&d); + let mut d = rustc_errors::Diagnostic::new(rustc_errors::Level::Bug, "unexpected panic"); + handler.emit_diagnostic(&mut d); } let version_info = rustc_tools_util::get_version_info!(); |
