File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -277,7 +277,7 @@ pub struct AssociatedItems {
277277
278278impl AssociatedItems {
279279 /// Constructs an `AssociatedItems` map from a series of `ty::AssocItem`s in definition order.
280- pub fn new ( items_in_def_order : Vec < ty:: AssocItem > ) -> Self {
280+ pub fn new ( items_in_def_order : impl IntoIterator < Item = ty:: AssocItem > ) -> Self {
281281 let items = items_in_def_order. into_iter ( ) . map ( |item| ( item. ident . name , item) ) . collect ( ) ;
282282 AssociatedItems { items }
283283 }
Original file line number Diff line number Diff line change @@ -211,8 +211,7 @@ fn associated_item_def_ids(tcx: TyCtxt<'_>, def_id: DefId) -> &[DefId] {
211211}
212212
213213fn associated_items < ' tcx > ( tcx : TyCtxt < ' tcx > , def_id : DefId ) -> & ' tcx ty:: AssociatedItems {
214- let items =
215- tcx. associated_item_def_ids ( def_id) . iter ( ) . map ( |did| tcx. associated_item ( * did) ) . collect ( ) ;
214+ let items = tcx. associated_item_def_ids ( def_id) . iter ( ) . map ( |did| tcx. associated_item ( * did) ) ;
216215 tcx. arena . alloc ( ty:: AssociatedItems :: new ( items) )
217216}
218217
You can’t perform that action at this time.
0 commit comments