Use Session::diagnostic in more places.

This commit is contained in:
Nicholas Nethercote 2023-12-01 13:45:29 +11:00
parent a179a53565
commit 31ac4efb31
7 changed files with 33 additions and 40 deletions

View file

@ -266,8 +266,7 @@ impl<'a> Parser<'a> {
if let Some(attr_range) = self.capture_state.inner_attr_ranges.remove(&inner_attr.id) {
inner_attr_replace_ranges.push(attr_range);
} else {
self.sess
.span_diagnostic
self.diagnostic()
.span_delayed_bug(inner_attr.span, "Missing token range for attribute");
}
}