Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit fb83ef6

Browse files
committed
Stop using DiagnosticBuilder::buffer in the parser.
One consequence is that errors returned by `maybe_new_parser_from_source_str` now must be consumed, so a bunch of places that previously ignored those errors now cancel them. (Most of them explicitly dropped the errors before. I guess that was to indicate "we are explicitly ignoring these", though I'm not 100% sure.)
1 parent beeaee9 commit fb83ef6

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)