Handle associated types that are lang items
Previously we were ignoring them.
This commit is contained in:
parent
cf243e5211
commit
1e0df17667
1 changed files with 13 additions and 5 deletions
|
@ -117,11 +117,19 @@ impl LangItems {
|
||||||
match def {
|
match def {
|
||||||
ModuleDefId::TraitId(trait_) => {
|
ModuleDefId::TraitId(trait_) => {
|
||||||
lang_items.collect_lang_item(db, trait_, LangItemTarget::Trait);
|
lang_items.collect_lang_item(db, trait_, LangItemTarget::Trait);
|
||||||
db.trait_data(trait_).items.iter().for_each(|&(_, assoc_id)| {
|
db.trait_data(trait_).items.iter().for_each(
|
||||||
if let AssocItemId::FunctionId(f) = assoc_id {
|
|&(_, assoc_id)| match assoc_id {
|
||||||
lang_items.collect_lang_item(db, f, LangItemTarget::Function);
|
AssocItemId::FunctionId(f) => {
|
||||||
}
|
lang_items.collect_lang_item(db, f, LangItemTarget::Function);
|
||||||
});
|
}
|
||||||
|
AssocItemId::TypeAliasId(alias) => lang_items.collect_lang_item(
|
||||||
|
db,
|
||||||
|
alias,
|
||||||
|
LangItemTarget::TypeAlias,
|
||||||
|
),
|
||||||
|
AssocItemId::ConstId(_) => {}
|
||||||
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
ModuleDefId::AdtId(AdtId::EnumId(e)) => {
|
ModuleDefId::AdtId(AdtId::EnumId(e)) => {
|
||||||
lang_items.collect_lang_item(db, e, LangItemTarget::EnumId);
|
lang_items.collect_lang_item(db, e, LangItemTarget::EnumId);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue