This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
compiler/rustc_typeck/src/check Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -921,14 +921,13 @@ pub(super) fn check_impl_items_against_trait<'tcx>(
921921
922922 // Locate trait definition and items
923923 let trait_def = tcx. trait_def ( impl_trait_ref. def_id ) ;
924-
925924 let impl_items = impl_item_refs. iter ( ) . map ( |iiref| tcx. hir ( ) . impl_item ( iiref. id ) ) ;
925+ let associated_items = tcx. associated_items ( impl_trait_ref. def_id ) ;
926926
927927 // Check existing impl methods to see if they are both present in trait
928928 // and compatible with trait signature
929929 for impl_item in impl_items {
930930 let ty_impl_item = tcx. associated_item ( tcx. hir ( ) . local_def_id ( impl_item. hir_id ) ) ;
931- let associated_items = tcx. associated_items ( impl_trait_ref. def_id ) ;
932931
933932 let mut items = associated_items. filter_by_name ( tcx, ty_impl_item. ident , impl_trait_ref. def_id ) ;
934933
@@ -1010,7 +1009,7 @@ pub(super) fn check_impl_items_against_trait<'tcx>(
10101009
10111010 if let Ok ( ancestors) = trait_def. ancestors ( tcx, impl_id. to_def_id ( ) ) {
10121011 let impl_span = tcx. sess . source_map ( ) . guess_head_span ( full_impl_span) ;
1013-
1012+
10141013 // Check for missing items from trait
10151014 let mut missing_items = Vec :: new ( ) ;
10161015 for trait_item in tcx. associated_items ( impl_trait_ref. def_id ) . in_definition_order ( ) {
You can’t perform that action at this time.
0 commit comments