Skip to content

Commit 1852200

Browse files
committed
Auto merge of rust-lang#114104 - oli-obk:syn2, r=compiler-errors
Lots of tiny incremental simplifications of `EmitterWriter` internals ignore the first commit, it's rust-lang#114088 squashed and rebased, but it's needed to use to use `derive_setters`, as they need a newer `syn` version. Then this PR starts out with removing many arguments that are almost always defaulted to `None` or `false` and replace them with builder methods that can set these fields in the few cases that want to set them. After that it's one commit after the other that removes or merges things until everything becomes some very simple trait objects
2 parents 1589759 + 084c90a commit 1852200

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

clippy_lints/src/doc.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use rustc_ast::token::CommentKind;
1616
use rustc_data_structures::fx::FxHashSet;
1717
use rustc_data_structures::sync::Lrc;
1818
use rustc_errors::emitter::EmitterWriter;
19-
use rustc_errors::{Applicability, Handler, SuggestionStyle, TerminalUrl};
19+
use rustc_errors::{Applicability, Handler, SuggestionStyle};
2020
use rustc_hir as hir;
2121
use rustc_hir::intravisit::{self, Visitor};
2222
use rustc_hir::{AnonConst, Expr};
@@ -718,16 +718,7 @@ fn check_code(cx: &LateContext<'_>, text: &str, edition: Edition, span: Span) {
718718
rustc_errors::fallback_fluent_bundle(rustc_driver::DEFAULT_LOCALE_RESOURCES.to_vec(), false);
719719
let emitter = EmitterWriter::new(
720720
Box::new(io::sink()),
721-
None,
722-
None,
723721
fallback_bundle,
724-
false,
725-
false,
726-
false,
727-
None,
728-
false,
729-
false,
730-
TerminalUrl::No,
731722
);
732723
let handler = Handler::with_emitter(Box::new(emitter)).disable_warnings();
733724
let sess = ParseSess::with_span_handler(handler, sm);

0 commit comments

Comments
 (0)