mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
Restore library symbols
This commit is contained in:
parent
7a6f5164f3
commit
97812c192a
1 changed files with 4 additions and 1 deletions
|
@ -23,7 +23,7 @@ use hir::{
|
||||||
use crate::{
|
use crate::{
|
||||||
completion::{completions, CompletionItem},
|
completion::{completions, CompletionItem},
|
||||||
db,
|
db,
|
||||||
symbol_index::{SymbolIndex, SymbolsDatabase},
|
symbol_index::{SymbolIndex, SymbolsDatabase, LibrarySymbolsQuery},
|
||||||
AnalysisChange, RootChange, Cancelable, CrateId, Diagnostic, FileId,
|
AnalysisChange, RootChange, Cancelable, CrateId, Diagnostic, FileId,
|
||||||
FileSystemEdit, FilePosition, Query, SourceChange, SourceFileNodeEdit,
|
FileSystemEdit, FilePosition, Query, SourceChange, SourceFileNodeEdit,
|
||||||
ReferenceResolution,
|
ReferenceResolution,
|
||||||
|
@ -71,6 +71,9 @@ impl AnalysisHostImpl {
|
||||||
self.db
|
self.db
|
||||||
.query_mut(ra_db::SourceRootQuery)
|
.query_mut(ra_db::SourceRootQuery)
|
||||||
.set(library.root_id, Default::default());
|
.set(library.root_id, Default::default());
|
||||||
|
self.db
|
||||||
|
.query_mut(LibrarySymbolsQuery)
|
||||||
|
.set(library.root_id, Arc::new(library.symbol_index));
|
||||||
self.apply_root_change(library.root_id, library.root_change);
|
self.apply_root_change(library.root_id, library.root_change);
|
||||||
}
|
}
|
||||||
self.db
|
self.db
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue