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.)
This commit is contained in:
Nicholas Nethercote 2024-01-11 14:22:44 +11:00
parent beeaee9785
commit fb83ef6495

View File

@ -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);
},
};