Skip to content

Commit

Permalink
Stop using DiagnosticBuilder::buffer in the parser.
Browse files Browse the repository at this point in the history
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.)
  • Loading branch information
nnethercote committed Jan 11, 2024
1 parent beeaee9 commit fb83ef6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clippy_lints/src/doc/needless_doctest_main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub fn check(
let mut parser = match maybe_new_parser_from_source_str(&sess, filename, code) {
Ok(p) => p,
Err(errs) => {
drop(errs);
errs.into_iter().for_each(|err| err.cancel());
return (false, test_attr_spans);
},
};
Expand Down

0 comments on commit fb83ef6

Please sign in to comment.