Skip to content

Commit d165a38

Browse files
committed
Rename many DiagCtxt and EarlyDiagCtxt locals.
1 parent bc3a3bc commit d165a38

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

clippy_lints/src/doc/needless_doctest_main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ pub fn check(
4545
let fallback_bundle =
4646
rustc_errors::fallback_fluent_bundle(rustc_driver::DEFAULT_LOCALE_RESOURCES.to_vec(), false);
4747
let emitter = EmitterWriter::new(Box::new(io::sink()), fallback_bundle);
48-
let handler = DiagCtxt::with_emitter(Box::new(emitter)).disable_warnings();
48+
let dcx = DiagCtxt::with_emitter(Box::new(emitter)).disable_warnings();
4949
#[expect(clippy::arc_with_non_send_sync)] // `Lrc` is expected by with_dcx
5050
let sm = Lrc::new(SourceMap::new(FilePathMapping::empty()));
51-
let sess = ParseSess::with_dcx(handler, sm);
51+
let sess = ParseSess::with_dcx(dcx, sm);
5252

5353
let mut parser = match maybe_new_parser_from_source_str(&sess, filename, code) {
5454
Ok(p) => p,

src/driver.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,9 @@ const BUG_REPORT_URL: &str = "https://github.com/rust-lang/rust-clippy/issues/ne
174174
#[allow(clippy::too_many_lines)]
175175
#[allow(clippy::ignored_unit_patterns)]
176176
pub fn main() {
177-
let handler = EarlyDiagCtxt::new(ErrorOutputType::default());
177+
let early_dcx = EarlyDiagCtxt::new(ErrorOutputType::default());
178178

179-
rustc_driver::init_rustc_env_logger(&handler);
179+
rustc_driver::init_rustc_env_logger(&early_dcx);
180180

181181
let using_internal_features = rustc_driver::install_ice_hook(BUG_REPORT_URL, |handler| {
182182
// FIXME: this macro calls unwrap internally but is called in a panicking context! It's not

0 commit comments

Comments
 (0)