Skip to content

Commit 152172f

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 9026fc5 + ddc2733 commit 152172f

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

examples/rustc-interface-example.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ fn main() {
5050
make_codegen_backend: None,
5151
expanded_args: Vec::new(),
5252
ice_file: None,
53-
hash_untracked_state: None,
53+
track_state: None,
5454
using_internal_features: &rustc_driver::USING_INTERNAL_FEATURES,
5555
};
5656
rustc_interface::run_compiler(config, |compiler| {
@@ -72,4 +72,4 @@ fn main() {
7272
}
7373
});
7474
});
75-
}
75+
}

examples/rustc-interface-getting-diagnostics.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ fn main() {
7878
make_codegen_backend: None,
7979
expanded_args: Vec::new(),
8080
ice_file: None,
81-
hash_untracked_state: None,
81+
track_state: None,
8282
using_internal_features: &rustc_driver::USING_INTERNAL_FEATURES,
8383
};
8484
rustc_interface::run_compiler(config, |compiler| {
@@ -97,4 +97,4 @@ fn main() {
9797
buffer.lock().unwrap().iter().for_each(|diagnostic| {
9898
println!("{diagnostic:#?}");
9999
});
100-
}
100+
}

0 commit comments

Comments
 (0)