@@ -86,7 +86,7 @@ impl<'tcx, 'interner> Visitor<'tcx> for ItemLowerer<'tcx, 'interner> {
8686 }
8787 }
8888
89- fn visit_trait_item ( & mut self , item : & ' tcx TraitItem ) {
89+ fn visit_trait_item ( & mut self , item : & ' tcx AssocItem ) {
9090 self . lctx . with_hir_id_owner ( item. id , |lctx| {
9191 let hir_item = lctx. lower_trait_item ( item) ;
9292 let id = hir:: TraitItemId { hir_id : hir_item. hir_id } ;
@@ -97,7 +97,7 @@ impl<'tcx, 'interner> Visitor<'tcx> for ItemLowerer<'tcx, 'interner> {
9797 visit:: walk_assoc_item ( self , item) ;
9898 }
9999
100- fn visit_impl_item ( & mut self , item : & ' tcx ImplItem ) {
100+ fn visit_impl_item ( & mut self , item : & ' tcx AssocItem ) {
101101 self . lctx . with_hir_id_owner ( item. id , |lctx| {
102102 let hir_item = lctx. lower_impl_item ( item) ;
103103 let id = hir:: ImplItemId { hir_id : hir_item. hir_id } ;
@@ -813,11 +813,11 @@ impl LoweringContext<'_> {
813813 }
814814 }
815815
816- fn lower_trait_item ( & mut self , i : & TraitItem ) -> hir:: TraitItem {
816+ fn lower_trait_item ( & mut self , i : & AssocItem ) -> hir:: TraitItem {
817817 let trait_item_def_id = self . resolver . definitions ( ) . local_def_id ( i. id ) ;
818818
819819 let ( generics, kind) = match i. kind {
820- TraitItemKind :: Const ( ref ty, ref default) => (
820+ AssocItemKind :: Const ( ref ty, ref default) => (
821821 self . lower_generics ( & i. generics , ImplTraitContext :: disallowed ( ) ) ,
822822 hir:: TraitItemKind :: Const (
823823 self . lower_ty ( ty, ImplTraitContext :: disallowed ( ) ) ,
@@ -826,7 +826,7 @@ impl LoweringContext<'_> {
826826 . map ( |x| self . lower_const_body ( i. span , Some ( x) ) ) ,
827827 ) ,
828828 ) ,
829- TraitItemKind :: Method ( ref sig, None ) => {
829+ AssocItemKind :: Method ( ref sig, None ) => {
830830 let names = self . lower_fn_params_to_names ( & sig. decl ) ;
831831 let ( generics, sig) = self . lower_method_sig (
832832 & i. generics ,
@@ -837,7 +837,7 @@ impl LoweringContext<'_> {
837837 ) ;
838838 ( generics, hir:: TraitItemKind :: Method ( sig, hir:: TraitMethod :: Required ( names) ) )
839839 }
840- TraitItemKind :: Method ( ref sig, Some ( ref body) ) => {
840+ AssocItemKind :: Method ( ref sig, Some ( ref body) ) => {
841841 let body_id = self . lower_fn_body_block ( i. span , & sig. decl , Some ( body) ) ;
842842 let ( generics, sig) = self . lower_method_sig (
843843 & i. generics ,
@@ -848,7 +848,7 @@ impl LoweringContext<'_> {
848848 ) ;
849849 ( generics, hir:: TraitItemKind :: Method ( sig, hir:: TraitMethod :: Provided ( body_id) ) )
850850 }
851- TraitItemKind :: TyAlias ( ref bounds, ref default) => {
851+ AssocItemKind :: TyAlias ( ref bounds, ref default) => {
852852 let generics = self . lower_generics ( & i. generics , ImplTraitContext :: disallowed ( ) ) ;
853853 let kind = hir:: TraitItemKind :: Type (
854854 self . lower_param_bounds ( bounds, ImplTraitContext :: disallowed ( ) ) ,
@@ -859,7 +859,7 @@ impl LoweringContext<'_> {
859859
860860 ( generics, kind)
861861 } ,
862- TraitItemKind :: Macro ( ..) => bug ! ( "macro item shouldn't exist at this point" ) ,
862+ AssocItemKind :: Macro ( ..) => bug ! ( "macro item shouldn't exist at this point" ) ,
863863 } ;
864864
865865 hir:: TraitItem {
@@ -872,21 +872,21 @@ impl LoweringContext<'_> {
872872 }
873873 }
874874
875- fn lower_trait_item_ref ( & mut self , i : & TraitItem ) -> hir:: TraitItemRef {
875+ fn lower_trait_item_ref ( & mut self , i : & AssocItem ) -> hir:: TraitItemRef {
876876 let ( kind, has_default) = match i. kind {
877- TraitItemKind :: Const ( _, ref default) => {
877+ AssocItemKind :: Const ( _, ref default) => {
878878 ( hir:: AssocItemKind :: Const , default. is_some ( ) )
879879 }
880- TraitItemKind :: TyAlias ( _, ref default) => {
880+ AssocItemKind :: TyAlias ( _, ref default) => {
881881 ( hir:: AssocItemKind :: Type , default. is_some ( ) )
882882 }
883- TraitItemKind :: Method ( ref sig, ref default) => (
883+ AssocItemKind :: Method ( ref sig, ref default) => (
884884 hir:: AssocItemKind :: Method {
885885 has_self : sig. decl . has_self ( ) ,
886886 } ,
887887 default. is_some ( ) ,
888888 ) ,
889- TraitItemKind :: Macro ( ..) => unimplemented ! ( ) ,
889+ AssocItemKind :: Macro ( ..) => unimplemented ! ( ) ,
890890 } ;
891891 hir:: TraitItemRef {
892892 id : hir:: TraitItemId { hir_id : self . lower_node_id ( i. id ) } ,
@@ -902,18 +902,18 @@ impl LoweringContext<'_> {
902902 self . expr ( span, hir:: ExprKind :: Err , ThinVec :: new ( ) )
903903 }
904904
905- fn lower_impl_item ( & mut self , i : & ImplItem ) -> hir:: ImplItem {
905+ fn lower_impl_item ( & mut self , i : & AssocItem ) -> hir:: ImplItem {
906906 let impl_item_def_id = self . resolver . definitions ( ) . local_def_id ( i. id ) ;
907907
908908 let ( generics, kind) = match i. kind {
909- ImplItemKind :: Const ( ref ty, ref expr) => (
909+ AssocItemKind :: Const ( ref ty, ref expr) => (
910910 self . lower_generics ( & i. generics , ImplTraitContext :: disallowed ( ) ) ,
911911 hir:: ImplItemKind :: Const (
912912 self . lower_ty ( ty, ImplTraitContext :: disallowed ( ) ) ,
913913 self . lower_const_body ( i. span , expr. as_deref ( ) ) ,
914914 ) ,
915915 ) ,
916- ImplItemKind :: Method ( ref sig, ref body) => {
916+ AssocItemKind :: Method ( ref sig, ref body) => {
917917 self . current_item = Some ( i. span ) ;
918918 let body_id = self . lower_maybe_async_body (
919919 i. span ,
@@ -932,7 +932,7 @@ impl LoweringContext<'_> {
932932
933933 ( generics, hir:: ImplItemKind :: Method ( sig, body_id) )
934934 }
935- ImplItemKind :: TyAlias ( _, ref ty) => {
935+ AssocItemKind :: TyAlias ( _, ref ty) => {
936936 let generics = self . lower_generics ( & i. generics , ImplTraitContext :: disallowed ( ) ) ;
937937 let kind = match ty {
938938 None => {
@@ -951,7 +951,7 @@ impl LoweringContext<'_> {
951951 } ;
952952 ( generics, kind)
953953 } ,
954- ImplItemKind :: Macro ( ..) => bug ! ( "`TyMac` should have been expanded by now" ) ,
954+ AssocItemKind :: Macro ( ..) => bug ! ( "`TyMac` should have been expanded by now" ) ,
955955 } ;
956956
957957 hir:: ImplItem {
@@ -968,26 +968,26 @@ impl LoweringContext<'_> {
968968 // [1] since `default impl` is not yet implemented, this is always true in impls
969969 }
970970
971- fn lower_impl_item_ref ( & mut self , i : & ImplItem ) -> hir:: ImplItemRef {
971+ fn lower_impl_item_ref ( & mut self , i : & AssocItem ) -> hir:: ImplItemRef {
972972 hir:: ImplItemRef {
973973 id : hir:: ImplItemId { hir_id : self . lower_node_id ( i. id ) } ,
974974 ident : i. ident ,
975975 span : i. span ,
976976 vis : self . lower_visibility ( & i. vis , Some ( i. id ) ) ,
977977 defaultness : self . lower_defaultness ( i. defaultness , true /* [1] */ ) ,
978978 kind : match & i. kind {
979- ImplItemKind :: Const ( ..) => hir:: AssocItemKind :: Const ,
980- ImplItemKind :: TyAlias ( _, ty) => match ty
979+ AssocItemKind :: Const ( ..) => hir:: AssocItemKind :: Const ,
980+ AssocItemKind :: TyAlias ( _, ty) => match ty
981981 . as_deref ( )
982982 . and_then ( |ty| ty. kind . opaque_top_hack ( ) )
983983 {
984984 None => hir:: AssocItemKind :: Type ,
985985 Some ( _) => hir:: AssocItemKind :: OpaqueTy ,
986986 } ,
987- ImplItemKind :: Method ( sig, _) => hir:: AssocItemKind :: Method {
987+ AssocItemKind :: Method ( sig, _) => hir:: AssocItemKind :: Method {
988988 has_self : sig. decl . has_self ( ) ,
989989 } ,
990- ImplItemKind :: Macro ( ..) => unimplemented ! ( ) ,
990+ AssocItemKind :: Macro ( ..) => unimplemented ! ( ) ,
991991 } ,
992992 }
993993
0 commit comments