Skip to content

Commit a4f8cea

Browse files
committed
Auto merge of #155671 - nnethercote:simplify-Config-track_state, r=bjorn3
Simplify `Config::track_state`. This is a callback used to track otherwise untracked state. It was added in rust-lang/rust#116731 for Clippy. (It was originally named `hash_untracked_state`, and examples in the rustc-dev-guide still use that name.) The `StableHasher` argument is unused, and probably has never been used. There is a FIXME comment pointing this out, which was added more than a year ago. This commit removes the `StableHasher` callback argument. This also removes the need for `Options::untracked_state_hash`. r? @bjorn3
2 parents 1293dad + c282756 commit a4f8cea

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/driver.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ struct RustcCallbacks {
121121
impl rustc_driver::Callbacks for RustcCallbacks {
122122
fn config(&mut self, config: &mut interface::Config) {
123123
let clippy_args_var = self.clippy_args_var.take();
124-
config.track_state = Some(Box::new(move |sess, _hasher| {
124+
config.track_state = Some(Box::new(move |sess| {
125125
track_clippy_args(sess, clippy_args_var.as_deref());
126126
}));
127127
config.extra_symbols = sym::EXTRA_SYMBOLS.into();
@@ -138,7 +138,7 @@ impl rustc_driver::Callbacks for ClippyCallbacks {
138138
let conf_path = clippy_config::lookup_conf_file();
139139
let previous = config.register_lints.take();
140140
let clippy_args_var = self.clippy_args_var.take();
141-
config.track_state = Some(Box::new(move |sess, _hasher| {
141+
config.track_state = Some(Box::new(move |sess| {
142142
track_clippy_args(sess, clippy_args_var.as_deref());
143143
track_files(sess);
144144

0 commit comments

Comments
 (0)