Rename many DiagCtxt and EarlyDiagCtxt locals.

This commit is contained in:
Nicholas Nethercote
2023-12-18 11:15:13 +11:00
parent d58e372853
commit f6aa418c9f
33 changed files with 250 additions and 258 deletions

View File

@@ -1416,10 +1416,10 @@ pub fn build_session(
);
let emitter = default_emitter(&sopts, registry, source_map.clone(), bundle, fallback_bundle);
let mut span_diagnostic = DiagCtxt::with_emitter(emitter)
let mut dcx = DiagCtxt::with_emitter(emitter)
.with_flags(sopts.unstable_opts.dcx_flags(can_emit_warnings));
if let Some(ice_file) = ice_file {
span_diagnostic = span_diagnostic.with_ice_file(ice_file);
dcx = dcx.with_ice_file(ice_file);
}
// Now that the proper handler has been constructed, drop early_dcx to
@@ -1440,7 +1440,7 @@ pub fn build_session(
match profiler {
Ok(profiler) => Some(Arc::new(profiler)),
Err(e) => {
span_diagnostic.emit_warning(errors::FailedToCreateProfiler { err: e.to_string() });
dcx.emit_warning(errors::FailedToCreateProfiler { err: e.to_string() });
None
}
}
@@ -1448,7 +1448,7 @@ pub fn build_session(
None
};
let mut parse_sess = ParseSess::with_dcx(span_diagnostic, source_map);
let mut parse_sess = ParseSess::with_dcx(dcx, source_map);
parse_sess.assume_incomplete_release = sopts.unstable_opts.assume_incomplete_release;
let host_triple = config::host_triple();