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 {
46
46
}
47
47
48
48
impl 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 ( )
51
51
}
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 ( )
54
55
}
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 ( )
57
59
}
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 ( )
60
63
}
61
64
}
62
65
You can’t perform that action at this time.
0 commit comments