Skip to content

Commit e13b5c8

Browse files
committed
Rename new_handler as new_dcx.
1 parent 7b8644e commit e13b5c8

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

src/librustdoc/config.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use rustc_session::EarlyDiagCtxt;
1919
use rustc_span::edition::Edition;
2020
use rustc_target::spec::TargetTriple;
2121

22-
use crate::core::new_handler;
22+
use crate::core::new_dcx;
2323
use crate::externalfiles::ExternalHtml;
2424
use crate::html;
2525
use crate::html::markdown::IdMap;
@@ -348,7 +348,7 @@ impl Options {
348348
let codegen_options = CodegenOptions::build(handler, matches);
349349
let unstable_opts = UnstableOptions::build(handler, matches);
350350

351-
let diag = new_handler(error_format, None, diagnostic_width, &unstable_opts);
351+
let diag = new_dcx(error_format, None, diagnostic_width, &unstable_opts);
352352

353353
// check for deprecated options
354354
check_deprecated_options(matches, &diag);

src/librustdoc/core.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ impl<'tcx> DocContext<'tcx> {
123123
/// Creates a new `DiagCtxt` that can be used to emit warnings and errors.
124124
///
125125
/// If the given `error_format` is `ErrorOutputType::Json` and no `SourceMap` is given, a new one
126-
/// will be created for the handler.
127-
pub(crate) fn new_handler(
126+
/// will be created for the `DiagCtxt`.
127+
pub(crate) fn new_dcx(
128128
error_format: ErrorOutputType,
129129
source_map: Option<Lrc<source_map::SourceMap>>,
130130
diagnostic_width: Option<usize>,

src/librustdoc/lib.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -745,12 +745,8 @@ fn main_args(
745745
}
746746
};
747747

748-
let diag = core::new_handler(
749-
options.error_format,
750-
None,
751-
options.diagnostic_width,
752-
&options.unstable_opts,
753-
);
748+
let diag =
749+
core::new_dcx(options.error_format, None, options.diagnostic_width, &options.unstable_opts);
754750

755751
match (options.should_test, options.markdown_input()) {
756752
(true, true) => return wrap_return(&diag, markdown::test(options)),

0 commit comments

Comments
 (0)