Skip to content

Commit fc57c84

Browse files
committed
Use Clippy version in ICE message
1 parent 676f14b commit fc57c84

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
@@ -264,10 +264,12 @@ fn report_clippy_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str) {
264264
handler.abort_if_errors_and_should_abort();
265265
}
266266

267+
let version_info = rustc_tools_util::get_version_info!();
268+
267269
let xs: Vec<Cow<'static, str>> = vec![
268270
"the compiler unexpectedly panicked. this is a bug.".into(),
269271
format!("we would appreciate a bug report: {}", bug_report_url).into(),
270-
format!("rustc {}", option_env!("CFG_VERSION").unwrap_or("unknown_version")).into(),
272+
format!("Clippy version: {}", version_info).into(),
271273
];
272274

273275
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)