diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-29 11:50:32 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-29 16:30:12 +1100 |
| commit | 880c1c585f1252a8b63b402b44def940cac6f134 (patch) | |
| tree | 0063455d2ea929c39fe540c73f1ae1b5739ad5c4 /compiler/rustc_errors/src | |
| parent | f9eef38e32f5e362006122d4a11d8e1f41e2f033 (diff) | |
| download | rust-880c1c585f1252a8b63b402b44def940cac6f134.tar.gz rust-880c1c585f1252a8b63b402b44def940cac6f134.zip | |
Rename `DiagCtxt::with_emitter` as `DiagCtxt::new`.
Because it's now the only constructor.
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/json/tests.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_errors/src/lib.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_errors/src/json/tests.rs b/compiler/rustc_errors/src/json/tests.rs index 303de0a93f6..ba8d58e159e 100644 --- a/compiler/rustc_errors/src/json/tests.rs +++ b/compiler/rustc_errors/src/json/tests.rs @@ -61,7 +61,7 @@ fn test_positions(code: &str, span: (u32, u32), expected_output: SpanTestData) { ); let span = Span::with_root_ctxt(BytePos(span.0), BytePos(span.1)); - let dcx = DiagCtxt::with_emitter(Box::new(je)); + let dcx = DiagCtxt::new(Box::new(je)); dcx.span_err(span, "foo"); let bytes = output.lock().unwrap(); diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index 72b3c88ee03..a5e6aed13eb 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -601,7 +601,7 @@ impl DiagCtxt { self } - pub fn with_emitter(emitter: Box<DynEmitter>) -> Self { + pub fn new(emitter: Box<DynEmitter>) -> Self { Self { inner: Lock::new(DiagCtxtInner { flags: DiagCtxtFlags { can_emit_warnings: true, ..Default::default() }, |
