mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
internal: Compute syntax validation errors on demand
This commit is contained in:
parent
4303e741de
commit
c3c9f5ffe1
11 changed files with 45 additions and 44 deletions
|
@ -788,11 +788,12 @@ impl<'a> AssocItemCollector<'a> {
|
|||
};
|
||||
self.diagnostics.push(diag);
|
||||
}
|
||||
if let errors @ [_, ..] = parse.errors() {
|
||||
let errors = parse.errors();
|
||||
if !errors.is_empty() {
|
||||
self.diagnostics.push(DefDiagnostic::macro_expansion_parse_error(
|
||||
self.module_id.local_id,
|
||||
error_call_kind(),
|
||||
errors,
|
||||
errors.into_boxed_slice(),
|
||||
));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue