about summary refs log tree commit diff
path: root/compiler/rustc_session
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-12-18 07:52:43 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2023-12-18 16:06:21 +1100
commitd1d0896c401e3d07e14ed7a339a766bd0da71bd2 (patch)
tree5433f7f9463fe88a7793077704bc3ae5856aa8cf /compiler/rustc_session
parent73bac456d413378b25210731c64eccc52c2201f7 (diff)
downloadrust-d1d0896c401e3d07e14ed7a339a766bd0da71bd2.tar.gz
rust-d1d0896c401e3d07e14ed7a339a766bd0da71bd2.zip
Rename `ParseSess::with_span_handler` as `ParseSess::with_dcx`.
Diffstat (limited to 'compiler/rustc_session')
-rw-r--r--compiler/rustc_session/src/parse.rs6
-rw-r--r--compiler/rustc_session/src/session.rs2
2 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_session/src/parse.rs b/compiler/rustc_session/src/parse.rs
index 42db9d116bf..b282d7de4ea 100644
--- a/compiler/rustc_session/src/parse.rs
+++ b/compiler/rustc_session/src/parse.rs
@@ -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]
diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs
index fe66b483451..e52e75e8c07 100644
--- a/compiler/rustc_session/src/session.rs
+++ b/compiler/rustc_session/src/session.rs
@@ -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();