Rename new_handler
as new_dcx
.
This commit is contained in:
parent
7b8644e5cf
commit
e13b5c8efb
3 changed files with 6 additions and 10 deletions
|
@ -19,7 +19,7 @@ use rustc_session::EarlyDiagCtxt;
|
||||||
use rustc_span::edition::Edition;
|
use rustc_span::edition::Edition;
|
||||||
use rustc_target::spec::TargetTriple;
|
use rustc_target::spec::TargetTriple;
|
||||||
|
|
||||||
use crate::core::new_handler;
|
use crate::core::new_dcx;
|
||||||
use crate::externalfiles::ExternalHtml;
|
use crate::externalfiles::ExternalHtml;
|
||||||
use crate::html;
|
use crate::html;
|
||||||
use crate::html::markdown::IdMap;
|
use crate::html::markdown::IdMap;
|
||||||
|
@ -348,7 +348,7 @@ impl Options {
|
||||||
let codegen_options = CodegenOptions::build(handler, matches);
|
let codegen_options = CodegenOptions::build(handler, matches);
|
||||||
let unstable_opts = UnstableOptions::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 for deprecated options
|
||||||
check_deprecated_options(matches, &diag);
|
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.
|
/// 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
|
/// If the given `error_format` is `ErrorOutputType::Json` and no `SourceMap` is given, a new one
|
||||||
/// will be created for the handler.
|
/// will be created for the `DiagCtxt`.
|
||||||
pub(crate) fn new_handler(
|
pub(crate) fn new_dcx(
|
||||||
error_format: ErrorOutputType,
|
error_format: ErrorOutputType,
|
||||||
source_map: Option<Lrc<source_map::SourceMap>>,
|
source_map: Option<Lrc<source_map::SourceMap>>,
|
||||||
diagnostic_width: Option<usize>,
|
diagnostic_width: Option<usize>,
|
||||||
|
|
|
@ -745,12 +745,8 @@ fn main_args(
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let diag = core::new_handler(
|
let diag =
|
||||||
options.error_format,
|
core::new_dcx(options.error_format, None, options.diagnostic_width, &options.unstable_opts);
|
||||||
None,
|
|
||||||
options.diagnostic_width,
|
|
||||||
&options.unstable_opts,
|
|
||||||
);
|
|
||||||
|
|
||||||
match (options.should_test, options.markdown_input()) {
|
match (options.should_test, options.markdown_input()) {
|
||||||
(true, true) => return wrap_return(&diag, markdown::test(options)),
|
(true, true) => return wrap_return(&diag, markdown::test(options)),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue