File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -323,6 +323,8 @@ impl Query {
323
323
hir:: ModuleDef :: Adt ( ..)
324
324
| hir:: ModuleDef :: TypeAlias ( ..)
325
325
| hir:: ModuleDef :: BuiltinType ( ..)
326
+ | hir:: ModuleDef :: TraitAlias ( ..)
327
+ | hir:: ModuleDef :: Trait ( ..)
326
328
)
327
329
{
328
330
continue ;
Original file line number Diff line number Diff line change @@ -175,8 +175,12 @@ impl TryToNav for FileSymbol {
175
175
176
176
Some ( NavigationTarget {
177
177
file_id : full_range. file_id ,
178
- name : if self . is_alias { self . def . name ( db) ?. to_smol_str ( ) } else { self . name . clone ( ) } ,
179
- alias : if self . is_alias { Some ( self . name . clone ( ) ) } else { None } ,
178
+ name : self
179
+ . is_alias
180
+ . then ( || self . def . name ( db) )
181
+ . flatten ( )
182
+ . map_or_else ( || self . name . clone ( ) , |it| it. to_smol_str ( ) ) ,
183
+ alias : self . is_alias . then ( || self . name . clone ( ) ) ,
180
184
kind : Some ( hir:: ModuleDefId :: from ( self . def ) . into ( ) ) ,
181
185
full_range : full_range. range ,
182
186
focus_range,
You can’t perform that action at this time.
0 commit comments