File tree 1 file changed +5
-5
lines changed
compiler/rustc_typeck/src/check
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1043,9 +1043,9 @@ pub(super) fn check_impl_items_against_trait<'tcx>(
1043
1043
}
1044
1044
}
1045
1045
1046
- // Check for missing items from trait
1047
- let mut missing_items = Vec :: new ( ) ;
1048
1046
if let Ok ( ancestors) = trait_def. ancestors ( tcx, impl_id. to_def_id ( ) ) {
1047
+ // Check for missing items from trait
1048
+ let mut missing_items = Vec :: new ( ) ;
1049
1049
for trait_item in tcx. associated_items ( impl_trait_ref. def_id ) . in_definition_order ( ) {
1050
1050
let is_implemented = ancestors
1051
1051
. leaf_def ( tcx, trait_item. ident , trait_item. kind )
@@ -1058,10 +1058,10 @@ pub(super) fn check_impl_items_against_trait<'tcx>(
1058
1058
}
1059
1059
}
1060
1060
}
1061
- }
1062
1061
1063
- if !missing_items. is_empty ( ) {
1064
- missing_items_err ( tcx, impl_span, & missing_items, full_impl_span) ;
1062
+ if !missing_items. is_empty ( ) {
1063
+ missing_items_err ( tcx, impl_span, & missing_items, full_impl_span) ;
1064
+ }
1065
1065
}
1066
1066
}
1067
1067
You can’t perform that action at this time.
0 commit comments