File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
src/tools/rust-analyzer/crates/hir-def/src Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -117,11 +117,19 @@ impl LangItems {
117117 match def {
118118 ModuleDefId :: TraitId ( trait_) => {
119119 lang_items. collect_lang_item ( db, trait_, LangItemTarget :: Trait ) ;
120- db. trait_data ( trait_) . items . iter ( ) . for_each ( |& ( _, assoc_id) | {
121- if let AssocItemId :: FunctionId ( f) = assoc_id {
122- lang_items. collect_lang_item ( db, f, LangItemTarget :: Function ) ;
123- }
124- } ) ;
120+ db. trait_data ( trait_) . items . iter ( ) . for_each (
121+ |& ( _, assoc_id) | match assoc_id {
122+ AssocItemId :: FunctionId ( f) => {
123+ lang_items. collect_lang_item ( db, f, LangItemTarget :: Function ) ;
124+ }
125+ AssocItemId :: TypeAliasId ( alias) => lang_items. collect_lang_item (
126+ db,
127+ alias,
128+ LangItemTarget :: TypeAlias ,
129+ ) ,
130+ AssocItemId :: ConstId ( _) => { }
131+ } ,
132+ ) ;
125133 }
126134 ModuleDefId :: AdtId ( AdtId :: EnumId ( e) ) => {
127135 lang_items. collect_lang_item ( db, e, LangItemTarget :: EnumId ) ;
You can’t perform that action at this time.
0 commit comments