diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-06-18 10:35:56 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-06-18 15:42:11 +0000 |
| commit | 4b7ae63fbff1b74d91ef326da6abe82d05151b0b (patch) | |
| tree | 8ccc0a1e069f731b42d8a16826bcb896c1078127 | |
| parent | 7218fdd2db0d5b5a1c05564ad1fd821de220c003 (diff) | |
| download | rust-4b7ae63fbff1b74d91ef326da6abe82d05151b0b.tar.gz rust-4b7ae63fbff1b74d91ef326da6abe82d05151b0b.zip | |
Use a dedicated type instead of a reference for the diagnostic context
This paves the way for tracking more state (e.g. error tainting) in the diagnostic context handle
| -rw-r--r-- | src/driver.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/driver.rs b/src/driver.rs index f79da26964f..6117e76897f 100644 --- a/src/driver.rs +++ b/src/driver.rs @@ -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 || { |
