add some comments to hir::ModuleItems
This commit is contained in:
parent
df8ac8f1d7
commit
1e926b50d7
@ -30,6 +30,10 @@ pub struct ModuleItems {
|
||||
}
|
||||
|
||||
impl ModuleItems {
|
||||
/// Returns all non-associated locally defined items in all modules.
|
||||
///
|
||||
/// Note that this does *not* include associated items of `impl` blocks! It also does not
|
||||
/// include foreign items. If you want to e.g. get all functions, use `definitions()` below.
|
||||
pub fn items(&self) -> impl Iterator<Item = ItemId> + '_ {
|
||||
self.items.iter().copied()
|
||||
}
|
||||
@ -38,6 +42,8 @@ pub fn trait_items(&self) -> impl Iterator<Item = TraitItemId> + '_ {
|
||||
self.trait_items.iter().copied()
|
||||
}
|
||||
|
||||
/// Returns all items that are associated with some `impl` block (both inherent and trait impl
|
||||
/// blocks).
|
||||
pub fn impl_items(&self) -> impl Iterator<Item = ImplItemId> + '_ {
|
||||
self.impl_items.iter().copied()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user