Skip to content

Commit

Permalink
Use Clippy version in ICE message
Browse files Browse the repository at this point in the history
  • Loading branch information
phansch committed Sep 27, 2019
1 parent 4992033 commit 38b0d74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,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<Cow<'static, str>> = 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 {
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/custom_ice_message.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 38b0d74

Please sign in to comment.