File tree 1 file changed +2
-3
lines changed
compiler/rustc_typeck/src/check
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>(
921
921
922
922
// Locate trait definition and items
923
923
let trait_def = tcx. trait_def ( impl_trait_ref. def_id ) ;
924
-
925
924
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 ) ;
926
926
927
927
// Check existing impl methods to see if they are both present in trait
928
928
// and compatible with trait signature
929
929
for impl_item in impl_items {
930
930
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 ) ;
932
931
933
932
let mut items = associated_items. filter_by_name ( tcx, ty_impl_item. ident , impl_trait_ref. def_id ) ;
934
933
@@ -1010,7 +1009,7 @@ pub(super) fn check_impl_items_against_trait<'tcx>(
1010
1009
1011
1010
if let Ok ( ancestors) = trait_def. ancestors ( tcx, impl_id. to_def_id ( ) ) {
1012
1011
let impl_span = tcx. sess . source_map ( ) . guess_head_span ( full_impl_span) ;
1013
-
1012
+
1014
1013
// Check for missing items from trait
1015
1014
let mut missing_items = Vec :: new ( ) ;
1016
1015
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