mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
don't break parser error recovery in presence of macros
Parser has the invariant that `{}` are balanced. Previous code tried (unsucesfuly) maintain the same invariant for `$()` as well, but it was done in a rather ad-hoc manner: it's not at all obvious that it is possible to maintain both invariants!
This commit is contained in:
parent
d614f463de
commit
3c68da792b
2 changed files with 6 additions and 2 deletions
|
@ -89,6 +89,10 @@ pub fn load(
|
|||
vfs.root2path(root)
|
||||
);
|
||||
analysis_change.add_root(source_root_id, is_local);
|
||||
analysis_change.set_debug_root_path(
|
||||
source_root_id,
|
||||
source_roots[&source_root_id].path().display().to_string(),
|
||||
);
|
||||
|
||||
let mut file_map = FxHashMap::default();
|
||||
for (vfs_file, path, text) in files {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue