Rename UnstableOptions::diagnostic_handler_flags as UnstableOptions::dcx_flags.

This commit is contained in:
Nicholas Nethercote 2023-12-18 08:59:22 +11:00
parent 7c656bc05b
commit 55bafab566
3 changed files with 3 additions and 4 deletions

View File

@ -1155,7 +1155,7 @@ impl Options {
}
impl UnstableOptions {
pub fn diagnostic_handler_flags(&self, can_emit_warnings: bool) -> DiagCtxtFlags {
pub fn dcx_flags(&self, can_emit_warnings: bool) -> DiagCtxtFlags {
DiagCtxtFlags {
can_emit_warnings,
treat_err_as_bug: self.treat_err_as_bug,

View File

@ -1417,7 +1417,7 @@ pub fn build_session(
let emitter = default_emitter(&sopts, registry, source_map.clone(), bundle, fallback_bundle);
let mut span_diagnostic = DiagCtxt::with_emitter(emitter)
.with_flags(sopts.unstable_opts.diagnostic_handler_flags(can_emit_warnings));
.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);
}

View File

@ -169,8 +169,7 @@ pub(crate) fn new_handler(
}
};
rustc_errors::DiagCtxt::with_emitter(emitter)
.with_flags(unstable_opts.diagnostic_handler_flags(true))
rustc_errors::DiagCtxt::with_emitter(emitter).with_flags(unstable_opts.dcx_flags(true))
}
/// Parse, resolve, and typecheck the given crate.