File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
compiler/rustc_middle/src/hir Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,10 @@ pub struct ModuleItems {
3030}
3131
3232impl ModuleItems {
33+ /// Returns all non-associated locally defined items in all modules.
34+ ///
35+ /// Note that this does *not* include associated items of `impl` blocks! It also does not
36+ /// include foreign items. If you want to e.g. get all functions, use `definitions()` below.
3337 pub fn items ( & self ) -> impl Iterator < Item = ItemId > + ' _ {
3438 self . items . iter ( ) . copied ( )
3539 }
@@ -38,6 +42,8 @@ impl ModuleItems {
3842 self . trait_items . iter ( ) . copied ( )
3943 }
4044
45+ /// Returns all items that are associated with some `impl` block (both inherent and trait impl
46+ /// blocks).
4147 pub fn impl_items ( & self ) -> impl Iterator < Item = ImplItemId > + ' _ {
4248 self . impl_items . iter ( ) . copied ( )
4349 }
You can’t perform that action at this time.
0 commit comments