File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
compiler/rustc_typeck/src/check Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -931,8 +931,9 @@ fn check_impl_items_against_trait<'tcx>(
931931 tcx. sess . delay_span_bug ( impl_item. span , "missing associated item in trait" ) ;
932932 continue ;
933933 } ;
934- match impl_item. kind {
935- hir:: AssocItemKind :: Const => {
934+ let impl_item_full = tcx. hir ( ) . impl_item ( impl_item. id ) ;
935+ match impl_item_full. kind {
936+ hir:: ImplItemKind :: Const ( ..) => {
936937 // Find associated const definition.
937938 compare_const_impl (
938939 tcx,
@@ -942,7 +943,7 @@ fn check_impl_items_against_trait<'tcx>(
942943 impl_trait_ref,
943944 ) ;
944945 }
945- hir:: AssocItemKind :: Fn { .. } => {
946+ hir:: ImplItemKind :: Fn ( .. ) => {
946947 let opt_trait_span = tcx. hir ( ) . span_if_local ( ty_trait_item. def_id ) ;
947948 compare_impl_method (
948949 tcx,
@@ -953,12 +954,12 @@ fn check_impl_items_against_trait<'tcx>(
953954 opt_trait_span,
954955 ) ;
955956 }
956- hir:: AssocItemKind :: Type => {
957+ hir:: ImplItemKind :: TyAlias ( impl_ty ) => {
957958 let opt_trait_span = tcx. hir ( ) . span_if_local ( ty_trait_item. def_id ) ;
958959 compare_ty_impl (
959960 tcx,
960961 & ty_impl_item,
961- impl_item . span ,
962+ impl_ty . span ,
962963 & ty_trait_item,
963964 impl_trait_ref,
964965 opt_trait_span,
You can’t perform that action at this time.
0 commit comments