about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-07-26 11:17:35 +0000
committerbors <bors@rust-lang.org>2023-07-26 11:17:35 +0000
commited2ec819e9d04b56c8cbb1b5f18119bb8292e542 (patch)
treed6b216d89d66cf28bfa1824835ca96e699d6558e
parent61e0aac615abfb234df08a4a669c86cc1f519e1e (diff)
parent3fb714d8281541d1ac872baa3b9c7a23a3d0f0eb (diff)
downloadrust-ed2ec819e9d04b56c8cbb1b5f18119bb8292e542.tar.gz
rust-ed2ec819e9d04b56c8cbb1b5f18119bb8292e542.zip
Auto merge of #114054 - oli-obk:cleanups, r=estebank
Split some functions with many arguments into builder pattern functions

r? `@estebank`

This doesn't resolve all of the ones in rustc, mostly because I need to do other cleanups in order to be able to use some builder derives from crates.io

Works around https://github.com/rust-lang/rust/issues/90672 by making `x test rustfmt --bless` format itself instead of testing that it is formatted
-rw-r--r--clippy_lints/src/doc.rs2
1 files changed, 1 insertions, 1 deletions
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 check_code(cx: &LateContext<'_>, text: &str, edition: Edition, span: Span) {
                     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) {