Skip to content

Commit ce11a3f

Browse files
authored
Rollup merge of #119841 - nnethercote:rm-DiagnosticBuilder-buffer, r=oli-obk
Remove `DiagnosticBuilder::buffer` `DiagnosticBuilder::buffer` doesn't do much, and part of what it does (for `-Ztreat-err-as-bug`) it shouldn't. This PR strips it back, replaces its uses, and finally removes it, making a few cleanups in the vicinity along the way. r? ``@oli-obk``
2 parents 4f957cd + e922607 commit ce11a3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/doc/needless_doctest_main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pub fn check(
5353
let mut parser = match maybe_new_parser_from_source_str(&sess, filename, code) {
5454
Ok(p) => p,
5555
Err(errs) => {
56-
drop(errs);
56+
errs.into_iter().for_each(|err| err.cancel());
5757
return (false, test_attr_spans);
5858
},
5959
};

0 commit comments

Comments
 (0)