File tree 1 file changed +6
-5
lines changed
compiler/rustc_typeck/src/check
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>(
931
931
tcx. sess . delay_span_bug ( impl_item. span , "missing associated item in trait" ) ;
932
932
continue ;
933
933
} ;
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 ( ..) => {
936
937
// Find associated const definition.
937
938
compare_const_impl (
938
939
tcx,
@@ -942,7 +943,7 @@ fn check_impl_items_against_trait<'tcx>(
942
943
impl_trait_ref,
943
944
) ;
944
945
}
945
- hir:: AssocItemKind :: Fn { .. } => {
946
+ hir:: ImplItemKind :: Fn ( .. ) => {
946
947
let opt_trait_span = tcx. hir ( ) . span_if_local ( ty_trait_item. def_id ) ;
947
948
compare_impl_method (
948
949
tcx,
@@ -953,12 +954,12 @@ fn check_impl_items_against_trait<'tcx>(
953
954
opt_trait_span,
954
955
) ;
955
956
}
956
- hir:: AssocItemKind :: Type => {
957
+ hir:: ImplItemKind :: TyAlias ( impl_ty ) => {
957
958
let opt_trait_span = tcx. hir ( ) . span_if_local ( ty_trait_item. def_id ) ;
958
959
compare_ty_impl (
959
960
tcx,
960
961
& ty_impl_item,
961
- impl_item . span ,
962
+ impl_ty . span ,
962
963
& ty_trait_item,
963
964
impl_trait_ref,
964
965
opt_trait_span,
You can’t perform that action at this time.
0 commit comments