Function rustdoc::core::new_dcx

source ยท
pub(crate) fn new_dcx(
    error_format: ErrorOutputType,
    source_map: Option<Lrc<SourceMap>>,
    diagnostic_width: Option<usize>,
    unstable_opts: &UnstableOptions,
) -> DiagCtxt
Expand description

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 DiagCtxt.