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)