@@ -43,11 +43,11 @@ pub enum PathResolution {
4343}
4444
4545impl PathResolution {
46- fn in_type_ns ( self ) -> Option < TypeNs > {
46+ fn in_type_ns ( & self ) -> Option < TypeNs > {
4747 match self {
48- PathResolution :: Def ( ModuleDef :: Adt ( adt) ) => Some ( TypeNs :: AdtId ( adt. into ( ) ) ) ,
48+ PathResolution :: Def ( ModuleDef :: Adt ( adt) ) => Some ( TypeNs :: AdtId ( ( * adt) . into ( ) ) ) ,
4949 PathResolution :: Def ( ModuleDef :: BuiltinType ( builtin) ) => {
50- Some ( TypeNs :: BuiltinType ( builtin) )
50+ Some ( TypeNs :: BuiltinType ( * builtin) )
5151 }
5252 PathResolution :: Def ( ModuleDef :: Const ( _) ) => None ,
5353 PathResolution :: Def ( ModuleDef :: EnumVariant ( _) ) => None ,
@@ -56,16 +56,16 @@ impl PathResolution {
5656 PathResolution :: Def ( ModuleDef :: Static ( _) ) => None ,
5757 PathResolution :: Def ( ModuleDef :: Trait ( _) ) => None ,
5858 PathResolution :: Def ( ModuleDef :: TypeAlias ( alias) ) => {
59- Some ( TypeNs :: TypeAliasId ( alias. into ( ) ) )
59+ Some ( TypeNs :: TypeAliasId ( ( * alias) . into ( ) ) )
6060 }
6161 PathResolution :: Local ( _) => None ,
62- PathResolution :: TypeParam ( param) => Some ( TypeNs :: GenericParam ( param. into ( ) ) ) ,
63- PathResolution :: SelfType ( impl_def) => Some ( TypeNs :: SelfType ( impl_def. into ( ) ) ) ,
62+ PathResolution :: TypeParam ( param) => Some ( TypeNs :: GenericParam ( ( * param) . into ( ) ) ) ,
63+ PathResolution :: SelfType ( impl_def) => Some ( TypeNs :: SelfType ( ( * impl_def) . into ( ) ) ) ,
6464 PathResolution :: Macro ( _) => None ,
6565 PathResolution :: AssocItem ( AssocItem :: Const ( _) ) => None ,
6666 PathResolution :: AssocItem ( AssocItem :: Function ( _) ) => None ,
6767 PathResolution :: AssocItem ( AssocItem :: TypeAlias ( alias) ) => {
68- Some ( TypeNs :: TypeAliasId ( alias. into ( ) ) )
68+ Some ( TypeNs :: TypeAliasId ( ( * alias) . into ( ) ) )
6969 }
7070 }
7171 }
@@ -77,7 +77,7 @@ impl PathResolution {
7777 db : & dyn HirDatabase ,
7878 mut cb : impl FnMut ( TypeAlias ) -> Option < R > ,
7979 ) -> Option < R > {
80- if let Some ( res) = self . clone ( ) . in_type_ns ( ) {
80+ if let Some ( res) = self . in_type_ns ( ) {
8181 associated_type_shorthand_candidates ( db, res, |_, _, id| cb ( id. into ( ) ) )
8282 } else {
8383 None
0 commit comments