about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-12-18 08:59:22 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2023-12-18 16:06:21 +1100
commit55bafab56604c09da647e7a1287edef1e310e0ef (patch)
tree09d7a2e440d33aab5230bc7ab232de95b532d045
parent7c656bc05bdb39884bdc5e87b2ed870233289591 (diff)
downloadrust-55bafab56604c09da647e7a1287edef1e310e0ef.tar.gz
rust-55bafab56604c09da647e7a1287edef1e310e0ef.zip
Rename `UnstableOptions::diagnostic_handler_flags` as `UnstableOptions::dcx_flags`.
-rw-r--r--compiler/rustc_session/src/config.rs2
-rw-r--r--compiler/rustc_session/src/session.rs2
-rw-r--r--src/librustdoc/core.rs3
3 files changed, 3 insertions, 4 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
index 9d9530aa3d3..d6bbb76e19a 100644
--- a/compiler/rustc_session/src/config.rs
+++ b/compiler/rustc_session/src/config.rs
@@ -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,
diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs
index e52e75e8c07..08190e1fff0 100644
--- a/compiler/rustc_session/src/session.rs
+++ b/compiler/rustc_session/src/session.rs
@@ -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);
     }
diff --git a/src/librustdoc/core.rs b/src/librustdoc/core.rs
index 8cac1df38e2..b8567aa9a89 100644
--- a/src/librustdoc/core.rs
+++ b/src/librustdoc/core.rs
@@ -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.