Use Clippy version in ICE message

This commit is contained in:
Philipp Hansch 2019-09-27 07:25:16 +02:00
parent 676f14baa0
commit fc57c84abe
No known key found for this signature in database
GPG Key ID: 82AA61CAA11397E6
2 changed files with 4 additions and 2 deletions

View File

@ -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<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 {

View File

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