Rename ParseSess::with_span_handler as ParseSess::with_dcx.
This commit is contained in:
parent
73bac456d4
commit
d1d0896c40
7 changed files with 11 additions and 11 deletions
|
|
@ -46,9 +46,9 @@ pub fn check(
|
|||
rustc_errors::fallback_fluent_bundle(rustc_driver::DEFAULT_LOCALE_RESOURCES.to_vec(), false);
|
||||
let emitter = EmitterWriter::new(Box::new(io::sink()), fallback_bundle);
|
||||
let handler = DiagCtxt::with_emitter(Box::new(emitter)).disable_warnings();
|
||||
#[expect(clippy::arc_with_non_send_sync)] // `Lrc` is expected by with_span_handler
|
||||
#[expect(clippy::arc_with_non_send_sync)] // `Lrc` is expected by with_dcx
|
||||
let sm = Lrc::new(SourceMap::new(FilePathMapping::empty()));
|
||||
let sess = ParseSess::with_span_handler(handler, sm);
|
||||
let sess = ParseSess::with_dcx(handler, sm);
|
||||
|
||||
let mut parser = match maybe_new_parser_from_source_str(&sess, filename, code) {
|
||||
Ok(p) => p,
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ impl ParseSess {
|
|||
config.hide_parse_errors(),
|
||||
config.color(),
|
||||
);
|
||||
let parse_sess = RawParseSess::with_span_handler(handler, source_map);
|
||||
let parse_sess = RawParseSess::with_dcx(handler, source_map);
|
||||
|
||||
Ok(ParseSess {
|
||||
parse_sess,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue