mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 14:38:46 +00:00
Take &mut Diagnostic in emit_diagnostic.
Taking a Diagnostic by move would break the usual pattern `diag.label(..).emit()`.
This commit is contained in:
parent
1f069c0ce7
commit
94c727eccf
1 changed files with 2 additions and 2 deletions
|
@ -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
|
// a .span_bug or .bug call has already printed what
|
||||||
// it wants to print.
|
// it wants to print.
|
||||||
if !info.payload().is::<rustc_errors::ExplicitBug>() {
|
if !info.payload().is::<rustc_errors::ExplicitBug>() {
|
||||||
let d = rustc_errors::Diagnostic::new(rustc_errors::Level::Bug, "unexpected panic");
|
let mut d = rustc_errors::Diagnostic::new(rustc_errors::Level::Bug, "unexpected panic");
|
||||||
handler.emit_diagnostic(&d);
|
handler.emit_diagnostic(&mut d);
|
||||||
}
|
}
|
||||||
|
|
||||||
let version_info = rustc_tools_util::get_version_info!();
|
let version_info = rustc_tools_util::get_version_info!();
|
||||||
|
|
Loading…
Add table
Reference in a new issue