From fc57c84abeee862fea08d823077f56ebab809ea7 Mon Sep 17 00:00:00 2001 From: Philipp Hansch Date: Fri, 27 Sep 2019 07:25:16 +0200 Subject: [PATCH] Use Clippy version in ICE message --- src/driver.rs | 4 +++- tests/ui/custom_ice_message.stderr | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/driver.rs b/src/driver.rs index 76aaae3747b..50c821c182d 100644 --- a/src/driver.rs +++ b/src/driver.rs @@ -264,10 +264,12 @@ fn report_clippy_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str) { handler.abort_if_errors_and_should_abort(); } + let version_info = rustc_tools_util::get_version_info!(); + let xs: Vec> = vec![ "the compiler unexpectedly panicked. this is a bug.".into(), format!("we would appreciate a bug report: {}", bug_report_url).into(), - format!("rustc {}", option_env!("CFG_VERSION").unwrap_or("unknown_version")).into(), + format!("Clippy version: {}", version_info).into(), ]; for note in &xs { diff --git a/tests/ui/custom_ice_message.stderr b/tests/ui/custom_ice_message.stderr index 85c9f42a2de..cacc41bb5df 100644 --- a/tests/ui/custom_ice_message.stderr +++ b/tests/ui/custom_ice_message.stderr @@ -7,5 +7,5 @@ note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new -note: rustc unknown_version +note: Clippy version: clippy 0.0.212 (68ff8b19 2019-09-26)