pub(crate) fn lang_item_query(
        db: &dyn DefDatabase,
        start_crate: CrateId,
        item: SmolStr,
    ) -> Option<LangItemTarget> {
        let _p = profile("lang_item_query");
        let lang_items = db.crate_lang_items(start_crate);
        let start_crate_target = lang_items.items.get(&item);
        if let Some(target) = start_crate_target {
            return Some(*target);
        }
        db.crate_graph()[start_crate]
            .dependencies
            .iter()
            .find_map(|dep| db.lang_item(dep.crate_id, item.clone()))
    }
/// Salsa query. Look for a lang item, starting from the specified crate and recursively
/// traversing its dependencies.
Salsa query. Look for a lang item, starting from the specified crate and recursively
traversing its dependencies.
Salsa query . Look for a lang item starting from the specified crate and recursively traversing its dependencies .
pub(crate) fn lang_item_query(
        db: &dyn DefDatabase,
        start_crate: CrateId,
        item: SmolStr,
    ) -> Option<LangItemTarget> {
        let _p = profile("lang_item_query");
        let lang_items = db.crate_lang_items(start_crate);
        let start_crate_target = lang_items.items.get(&item);
        if let Some(target) = start_crate_target {
            return Some(*target);
        }
        db.crate_graph()[start_crate]
            .dependencies
            .iter()
            .find_map(|dep| db.lang_item(dep.crate_id, item.clone()))
    }
pub ( crate ) fn lang_item_query ( db : & dyn DefDatabase , start_crate : CrateId , item : SmolStr , ) -> Option < LangItemTarget > { let _p = profile ( " " ) ; let lang_items = db . crate_lang_items ( start_crate ) ; let start_crate_target = lang_items . items . get ( & item ) ; if let Some ( target ) = start_crate_target { return Some ( * target ) ; } db . crate_graph ( ) [ start_crate ] . dependencies . iter ( ) . find_map ( | dep | db . lang_item ( dep . crate_id , item . clone ( ) ) ) }
Salsa query.
Salsa query .
db
&dyn DefDatabase
start_crate
CrateId
item
SmolStr
db
&dyn DefDatabase
start_crate
CrateId
item
SmolStr