mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-13 15:33:53 +00:00
Rename new_handler
as new_dcx
.
This commit is contained in:
parent
7b8644e5cf
commit
e13b5c8efb
@ -19,7 +19,7 @@ use rustc_session::EarlyDiagCtxt;
|
||||
use rustc_span::edition::Edition;
|
||||
use rustc_target::spec::TargetTriple;
|
||||
|
||||
use crate::core::new_handler;
|
||||
use crate::core::new_dcx;
|
||||
use crate::externalfiles::ExternalHtml;
|
||||
use crate::html;
|
||||
use crate::html::markdown::IdMap;
|
||||
@ -348,7 +348,7 @@ impl Options {
|
||||
let codegen_options = CodegenOptions::build(handler, matches);
|
||||
let unstable_opts = UnstableOptions::build(handler, matches);
|
||||
|
||||
let diag = new_handler(error_format, None, diagnostic_width, &unstable_opts);
|
||||
let diag = new_dcx(error_format, None, diagnostic_width, &unstable_opts);
|
||||
|
||||
// check for deprecated options
|
||||
check_deprecated_options(matches, &diag);
|
||||
|
@ -123,8 +123,8 @@ impl<'tcx> DocContext<'tcx> {
|
||||
/// Creates a new `DiagCtxt` that can be used to emit warnings and errors.
|
||||
///
|
||||
/// If the given `error_format` is `ErrorOutputType::Json` and no `SourceMap` is given, a new one
|
||||
/// will be created for the handler.
|
||||
pub(crate) fn new_handler(
|
||||
/// will be created for the `DiagCtxt`.
|
||||
pub(crate) fn new_dcx(
|
||||
error_format: ErrorOutputType,
|
||||
source_map: Option<Lrc<source_map::SourceMap>>,
|
||||
diagnostic_width: Option<usize>,
|
||||
|
@ -745,12 +745,8 @@ fn main_args(
|
||||
}
|
||||
};
|
||||
|
||||
let diag = core::new_handler(
|
||||
options.error_format,
|
||||
None,
|
||||
options.diagnostic_width,
|
||||
&options.unstable_opts,
|
||||
);
|
||||
let diag =
|
||||
core::new_dcx(options.error_format, None, options.diagnostic_width, &options.unstable_opts);
|
||||
|
||||
match (options.should_test, options.markdown_input()) {
|
||||
(true, true) => return wrap_return(&diag, markdown::test(options)),
|
||||
|
Loading…
Reference in New Issue
Block a user