Skip to content

Commit

Permalink
Use a dedicated type instead of a reference for the diagnostic context
Browse files Browse the repository at this point in the history
This paves the way for tracking more state (e.g. error tainting) in the diagnostic context handle
  • Loading branch information
oli-obk committed Jun 18, 2024
1 parent 7218fdd commit 4b7ae63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,12 @@ pub fn main() {

rustc_driver::init_rustc_env_logger(&early_dcx);

let using_internal_features = rustc_driver::install_ice_hook(BUG_REPORT_URL, |handler| {
let using_internal_features = rustc_driver::install_ice_hook(BUG_REPORT_URL, |dcx| {
// FIXME: this macro calls unwrap internally but is called in a panicking context! It's not
// as simple as moving the call from the hook to main, because `install_ice_hook` doesn't
// accept a generic closure.
let version_info = rustc_tools_util::get_version_info!();
handler.note(format!("Clippy version: {version_info}"));
dcx.handle().note(format!("Clippy version: {version_info}"));
});

exit(rustc_driver::catch_with_exit_code(move || {
Expand Down

0 comments on commit 4b7ae63

Please sign in to comment.