Merge #10423
10423: Internal: refactor for mdbook plugin r=Veykril a=HKalbasi This PR is for upstreaming changes that I made for mdbook plugin. Changes are adding inlay hints to `StaticIndex` and changing some functions for working around privacy of crates. Aside this, is it okay if I bring the plugin in tree? It is a simple binary crate. I feel it will better maintained here and become resistant to api changes. Co-authored-by: hamidreza kalbasi <hamidrezakalbasi@protonmail.com>
This commit is contained in:
@@ -186,7 +186,7 @@ impl LsifManager<'_> {
|
||||
}
|
||||
|
||||
fn add_file(&mut self, file: StaticIndexedFile) {
|
||||
let StaticIndexedFile { file_id, tokens, folds } = file;
|
||||
let StaticIndexedFile { file_id, tokens, folds, .. } = file;
|
||||
let doc_id = self.get_file_id(file_id);
|
||||
let text = self.analysis.file_text(file_id).unwrap();
|
||||
let line_index = self.db.line_index(file_id);
|
||||
@@ -247,7 +247,7 @@ impl flags::Lsif {
|
||||
let db = host.raw_database();
|
||||
let analysis = host.analysis();
|
||||
|
||||
let si = StaticIndex::compute(db, &analysis);
|
||||
let si = StaticIndex::compute(&analysis);
|
||||
|
||||
let mut lsif = LsifManager::new(&analysis, db, &vfs);
|
||||
lsif.add_vertex(lsif::Vertex::MetaData(lsif::MetaData {
|
||||
|
||||
Reference in New Issue
Block a user