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 | 81100bd154a166c088d1f6447ccc9f92c9a26c56 (patch) | |
| tree | 7572e3c0cf866166561d87258b6a2d1274bfe7ff | |
| parent | e3b8b5282c5b8f5ab9cb49d0a7e74717fe97bdd1 (diff) | |
| download | rust-81100bd154a166c088d1f6447ccc9f92c9a26c56.tar.gz rust-81100bd154a166c088d1f6447ccc9f92c9a26c56.zip | |
Rename `DiagCtxt::with_emitter` as `DiagCtxt::new`.
Because it's now the only constructor.
| -rw-r--r-- | clippy_lints/src/doc/needless_doctest_main.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/doc/needless_doctest_main.rs b/clippy_lints/src/doc/needless_doctest_main.rs index 58656140352..fdb9ceb7179 100644 --- a/clippy_lints/src/doc/needless_doctest_main.rs +++ b/clippy_lints/src/doc/needless_doctest_main.rs @@ -45,7 +45,7 @@ pub fn check( let fallback_bundle = rustc_errors::fallback_fluent_bundle(rustc_driver::DEFAULT_LOCALE_RESOURCES.to_vec(), false); let emitter = HumanEmitter::new(Box::new(io::sink()), fallback_bundle); - let dcx = DiagCtxt::with_emitter(Box::new(emitter)).disable_warnings(); + let dcx = DiagCtxt::new(Box::new(emitter)).disable_warnings(); #[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_dcx(dcx, sm); |
