Skip to content

Commit 653fce8

Browse files
committed
Use Clippy version in ICE message
1 parent c85f32a commit 653fce8

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/driver.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,10 +257,12 @@ fn report_clippy_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str) {
257257
handler.abort_if_errors_and_should_abort();
258258
}
259259

260+
let version_info = rustc_tools_util::get_version_info!();
261+
260262
let xs: Vec<Cow<'static, str>> = vec![
261263
"the compiler unexpectedly panicked. this is a bug.".into(),
262264
format!("we would appreciate a bug report: {}", bug_report_url).into(),
263-
format!("rustc {}", option_env!("CFG_VERSION").unwrap_or("unknown_version")).into(),
265+
format!("Clippy version: {}", version_info).into(),
264266
];
265267

266268
for note in &xs {

tests/ui/custom_ice_message.stderr

Lines changed: 1 addition & 1 deletion
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)