pub(crate) fn crate_lang_items_query(db: &dyn DefDatabase, krate: CrateId) -> Arc<LangItems> {
        let _p = profile("crate_lang_items_query");

        let mut lang_items = LangItems::default();

        let crate_def_map = db.crate_def_map(krate);

        crate_def_map
            .modules
            .iter()
            .filter_map(|(local_id, _)| db.module_lang_items(ModuleId { krate, local_id }))
            .for_each(|it| lang_items.items.extend(it.items.iter().map(|(k, v)| (k.clone(), *v))));

        Arc::new(lang_items)
    }
/// Salsa query. This will look for lang items in a specific crate.
Salsa query. This will look for lang items in a specific crate.
Salsa query . This will look for lang items in a specific crate .
pub(crate) fn crate_lang_items_query(db: &dyn DefDatabase, krate: CrateId) -> Arc<LangItems> {
        let _p = profile("crate_lang_items_query");
        let mut lang_items = LangItems::default();
        let crate_def_map = db.crate_def_map(krate);
        crate_def_map
            .modules
            .iter()
            .filter_map(|(local_id, _)| db.module_lang_items(ModuleId { krate, local_id }))
            .for_each(|it| lang_items.items.extend(it.items.iter().map(|(k, v)| (k.clone(), *v))));
        Arc::new(lang_items)
    }
pub ( crate ) fn crate_lang_items_query ( db : & dyn DefDatabase , krate : CrateId ) -> Arc < LangItems > { let _p = profile ( " " ) ; let mut lang_items = LangItems :: default ( ) ; let crate_def_map = db . crate_def_map ( krate ) ; crate_def_map . modules . iter ( ) . filter_map ( | ( local_id , _ ) | db . module_lang_items ( ModuleId { krate , local_id } ) ) . for_each ( | it | lang_items . items . extend ( it . items . iter ( ) . map ( | ( k , v ) | ( k . clone ( ) , * v ) ) ) ) ; Arc :: new ( lang_items ) }
Salsa query.
Salsa query .
db
&dyn DefDatabase
krate
CrateId
db
&dyn DefDatabase
krate
CrateId