File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
compiler/rustc_middle/src/hir Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -46,17 +46,20 @@ pub struct ModuleItems {
4646}
4747
4848impl ModuleItems {
49- pub fn items ( & self ) -> impl Iterator < Item = ItemId > {
50- self . items . to_vec ( ) . into_iter ( )
49+ pub fn items ( & self ) -> impl Iterator < Item = ItemId > + ' _ {
50+ self . items . iter ( ) . copied ( )
5151 }
52- pub fn trait_items ( & self ) -> impl Iterator < Item = TraitItemId > {
53- self . trait_items . to_vec ( ) . into_iter ( )
52+
53+ pub fn trait_items ( & self ) -> impl Iterator < Item = TraitItemId > + ' _ {
54+ self . trait_items . iter ( ) . copied ( )
5455 }
55- pub fn impl_items ( & self ) -> impl Iterator < Item = ImplItemId > {
56- self . impl_items . to_vec ( ) . into_iter ( )
56+
57+ pub fn impl_items ( & self ) -> impl Iterator < Item = ImplItemId > + ' _ {
58+ self . impl_items . iter ( ) . copied ( )
5759 }
58- pub fn foreign_items ( & self ) -> impl Iterator < Item = ForeignItemId > {
59- self . foreign_items . to_vec ( ) . into_iter ( )
60+
61+ pub fn foreign_items ( & self ) -> impl Iterator < Item = ForeignItemId > + ' _ {
62+ self . foreign_items . iter ( ) . copied ( )
6063 }
6164}
6265
You can’t perform that action at this time.
0 commit comments