Rename DiagCtxt::with_emitter
as DiagCtxt::new
.
Because it's now the only constructor.
This commit is contained in:
parent
4026fd735c
commit
0811e8f877
@ -154,7 +154,7 @@ fn default_dcx(
|
||||
);
|
||||
Box::new(HumanEmitter::stderr(emit_color, fallback_bundle).sm(Some(source_map.clone())))
|
||||
};
|
||||
DiagCtxt::with_emitter(Box::new(SilentOnIgnoredFilesEmitter {
|
||||
DiagCtxt::new(Box::new(SilentOnIgnoredFilesEmitter {
|
||||
has_non_ignorable_parser_errors: false,
|
||||
source_map,
|
||||
emitter,
|
||||
@ -235,7 +235,7 @@ impl ParseSess {
|
||||
}
|
||||
|
||||
pub(crate) fn set_silent_emitter(&mut self) {
|
||||
self.parse_sess.dcx = DiagCtxt::with_emitter(silent_emitter());
|
||||
self.parse_sess.dcx = DiagCtxt::new(silent_emitter());
|
||||
}
|
||||
|
||||
pub(crate) fn span_to_filename(&self, span: Span) -> FileName {
|
||||
|
Loading…
x
Reference in New Issue
Block a user