@@ -402,9 +402,9 @@ impl Module {
402402 def_map[ self . id . local_id ] . scope . declarations ( ) . map ( ModuleDef :: from) . collect ( )
403403 }
404404
405- pub fn impl_defs ( self , db : & dyn HirDatabase ) -> Vec < ImplDef > {
405+ pub fn impl_defs ( self , db : & dyn HirDatabase ) -> Vec < Impl > {
406406 let def_map = db. crate_def_map ( self . id . krate ) ;
407- def_map[ self . id . local_id ] . scope . impls ( ) . map ( ImplDef :: from) . collect ( )
407+ def_map[ self . id . local_id ] . scope . impls ( ) . map ( Impl :: from) . collect ( )
408408 }
409409
410410 pub ( crate ) fn with_module_id ( self , module_id : LocalModuleId ) -> Module {
@@ -1007,7 +1007,7 @@ pub enum AssocItem {
10071007}
10081008pub enum AssocItemContainer {
10091009 Trait ( Trait ) ,
1010- ImplDef ( ImplDef ) ,
1010+ Impl ( Impl ) ,
10111011}
10121012pub trait AsAssocItem {
10131013 fn as_assoc_item ( self , db : & dyn HirDatabase ) -> Option < AssocItem > ;
@@ -1064,7 +1064,7 @@ impl AssocItem {
10641064 } ;
10651065 match container {
10661066 AssocContainerId :: TraitId ( id) => AssocItemContainer :: Trait ( id. into ( ) ) ,
1067- AssocContainerId :: ImplId ( id) => AssocItemContainer :: ImplDef ( id. into ( ) ) ,
1067+ AssocContainerId :: ImplId ( id) => AssocItemContainer :: Impl ( id. into ( ) ) ,
10681068 AssocContainerId :: ContainerId ( _) => panic ! ( "invalid AssocItem" ) ,
10691069 }
10701070 }
@@ -1086,7 +1086,7 @@ pub enum GenericDef {
10861086 Adt ( Adt ) ,
10871087 Trait ( Trait ) ,
10881088 TypeAlias ( TypeAlias ) ,
1089- ImplDef ( ImplDef ) ,
1089+ Impl ( Impl ) ,
10901090 // enum variants cannot have generics themselves, but their parent enums
10911091 // can, and this makes some code easier to write
10921092 EnumVariant ( EnumVariant ) ,
@@ -1098,7 +1098,7 @@ impl_from!(
10981098 Adt ( Struct , Enum , Union ) ,
10991099 Trait ,
11001100 TypeAlias ,
1101- ImplDef ,
1101+ Impl ,
11021102 EnumVariant ,
11031103 Const
11041104 for GenericDef
@@ -1268,18 +1268,18 @@ impl LifetimeParam {
12681268
12691269// FIXME: rename from `ImplDef` to `Impl`
12701270#[ derive( Debug , Clone , Copy , PartialEq , Eq , Hash ) ]
1271- pub struct ImplDef {
1271+ pub struct Impl {
12721272 pub ( crate ) id : ImplId ,
12731273}
12741274
1275- impl ImplDef {
1276- pub fn all_in_crate ( db : & dyn HirDatabase , krate : Crate ) -> Vec < ImplDef > {
1275+ impl Impl {
1276+ pub fn all_in_crate ( db : & dyn HirDatabase , krate : Crate ) -> Vec < Impl > {
12771277 let inherent = db. inherent_impls_in_crate ( krate. id ) ;
12781278 let trait_ = db. trait_impls_in_crate ( krate. id ) ;
12791279
12801280 inherent. all_impls ( ) . chain ( trait_. all_impls ( ) ) . map ( Self :: from) . collect ( )
12811281 }
1282- pub fn for_trait ( db : & dyn HirDatabase , krate : Crate , trait_ : Trait ) -> Vec < ImplDef > {
1282+ pub fn for_trait ( db : & dyn HirDatabase , krate : Crate , trait_ : Trait ) -> Vec < Impl > {
12831283 let impls = db. trait_impls_in_crate ( krate. id ) ;
12841284 impls. for_trait ( trait_. id ) . map ( Self :: from) . collect ( )
12851285 }
@@ -1904,7 +1904,7 @@ pub enum ScopeDef {
19041904 ModuleDef ( ModuleDef ) ,
19051905 MacroDef ( MacroDef ) ,
19061906 GenericParam ( TypeParam ) ,
1907- ImplSelfType ( ImplDef ) ,
1907+ ImplSelfType ( Impl ) ,
19081908 AdtSelfType ( Adt ) ,
19091909 Local ( Local ) ,
19101910 Unknown ,
0 commit comments