From 3fb714d8281541d1ac872baa3b9c7a23a3d0f0eb Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Tue, 25 Jul 2023 10:27:34 +0000 Subject: [PATCH] Use a builder instead of boolean/option arguments --- clippy_lints/src/doc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clippy_lints/src/doc.rs b/clippy_lints/src/doc.rs index 8879c529262..00f70e586f4 100644 --- a/clippy_lints/src/doc.rs +++ b/clippy_lints/src/doc.rs @@ -729,7 +729,7 @@ fn has_needless_main(code: String, edition: Edition) -> bool { false, TerminalUrl::No, ); - let handler = Handler::with_emitter(false, None, Box::new(emitter), None); + let handler = Handler::with_emitter(Box::new(emitter)).disable_warnings(); let sess = ParseSess::with_span_handler(handler, sm); let mut parser = match maybe_new_parser_from_source_str(&sess, filename, code) {