Skip to content

Commit 38b0d74

Browse files
committed
Use Clippy version in ICE message
1 parent 4992033 commit 38b0d74

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/driver.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,12 @@ fn report_clippy_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str) {
288288
handler.abort_if_errors_and_should_abort();
289289
}
290290

291+
let version_info = rustc_tools_util::get_version_info!();
292+
291293
let xs: Vec<Cow<'static, str>> = vec![
292294
"the compiler unexpectedly panicked. this is a bug.".into(),
293295
format!("we would appreciate a bug report: {}", bug_report_url).into(),
294-
format!("rustc {}", option_env!("CFG_VERSION").unwrap_or("unknown_version")).into(),
296+
format!("Clippy version: {}", version_info).into(),
295297
];
296298

297299
for note in &xs {

tests/ui/custom_ice_message.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ note: the compiler unexpectedly panicked. this is a bug.
77

88
note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new
99

10-
note: rustc unknown_version
10+
note: Clippy version: clippy 0.0.212 (68ff8b19 2019-09-26)
1111

0 commit comments

Comments
 (0)