diff --git a/src/librustc_typeck/check/wfcheck.rs b/src/librustc_typeck/check/wfcheck.rs index 58820dcb381..2061c4f8c9c 100644 --- a/src/librustc_typeck/check/wfcheck.rs +++ b/src/librustc_typeck/check/wfcheck.rs @@ -443,7 +443,7 @@ fn check_associated_type_defaults(fcx: &FnCtxt<'_, '_>, trait_def_id: DefId) { // `>::Assoc` to the default type. let map = tcx .associated_items(trait_def_id) - .iter() + .in_definition_order() .filter_map(|item| { if item.kind == ty::AssocKind::Type && item.defaultness.has_value() { // `>::Assoc`