Add symbol index FIXME

This commit is contained in:
Jonas Schievink 2020-06-11 12:03:08 +02:00
parent dd22657407
commit 6766a6b0e1

View File

@ -177,6 +177,9 @@ pub fn world_symbols(db: &RootDatabase, query: Query) -> Vec<FileSymbol> {
}
pub fn crate_symbols(db: &RootDatabase, krate: CrateId, query: Query) -> Vec<FileSymbol> {
// FIXME(#4842): This now depends on CrateDefMap, why not build the entire symbol index from
// that instead?
let def_map = db.crate_def_map(krate);
let mut files = Vec::new();
let mut modules = vec![def_map.root];