1
Fork 0

Rename ParseSess::with_span_handler as ParseSess::with_dcx.

This commit is contained in:
Nicholas Nethercote 2023-12-18 07:52:43 +11:00
parent 73bac456d4
commit d1d0896c40
7 changed files with 11 additions and 11 deletions

View file

@ -227,10 +227,10 @@ impl ParseSess {
let fallback_bundle = fallback_fluent_bundle(locale_resources, false);
let sm = Lrc::new(SourceMap::new(file_path_mapping));
let handler = DiagCtxt::with_tty_emitter(Some(sm.clone()), fallback_bundle);
ParseSess::with_span_handler(handler, sm)
ParseSess::with_dcx(handler, sm)
}
pub fn with_span_handler(handler: DiagCtxt, source_map: Lrc<SourceMap>) -> Self {
pub fn with_dcx(handler: DiagCtxt, source_map: Lrc<SourceMap>) -> Self {
Self {
dcx: handler,
unstable_features: UnstableFeatures::from_environment(None),
@ -258,7 +258,7 @@ impl ParseSess {
let fatal_handler = DiagCtxt::with_tty_emitter(None, fallback_bundle).disable_warnings();
let handler = DiagCtxt::with_emitter(Box::new(SilentEmitter { fatal_handler, fatal_note }))
.disable_warnings();
ParseSess::with_span_handler(handler, sm)
ParseSess::with_dcx(handler, sm)
}
#[inline]

View file

@ -1448,7 +1448,7 @@ pub fn build_session(
None
};
let mut parse_sess = ParseSess::with_span_handler(span_diagnostic, source_map);
let mut parse_sess = ParseSess::with_dcx(span_diagnostic, source_map);
parse_sess.assume_incomplete_release = sopts.unstable_opts.assume_incomplete_release;
let host_triple = config::host_triple();