Skip to content

Commit 94c727e

Browse files
committed
Take &mut Diagnostic in emit_diagnostic.
Taking a Diagnostic by move would break the usual pattern `diag.label(..).emit()`.
1 parent 1f069c0 commit 94c727e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/driver.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ fn report_clippy_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str) {
178178
// a .span_bug or .bug call has already printed what
179179
// it wants to print.
180180
if !info.payload().is::<rustc_errors::ExplicitBug>() {
181-
let d = rustc_errors::Diagnostic::new(rustc_errors::Level::Bug, "unexpected panic");
182-
handler.emit_diagnostic(&d);
181+
let mut d = rustc_errors::Diagnostic::new(rustc_errors::Level::Bug, "unexpected panic");
182+
handler.emit_diagnostic(&mut d);
183183
}
184184

185185
let version_info = rustc_tools_util::get_version_info!();

0 commit comments

Comments
 (0)