aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/item_tree.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_def/src/item_tree.rs')
-rw-r--r--crates/ra_hir_def/src/item_tree.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/crates/ra_hir_def/src/item_tree.rs b/crates/ra_hir_def/src/item_tree.rs
index 3ea6e10c9..9dee4f43d 100644
--- a/crates/ra_hir_def/src/item_tree.rs
+++ b/crates/ra_hir_def/src/item_tree.rs
@@ -82,8 +82,8 @@ impl ItemTree {
82 82
83 /// Returns an iterator over all items located at the top level of the `HirFileId` this 83 /// Returns an iterator over all items located at the top level of the `HirFileId` this
84 /// `ItemTree` was created from. 84 /// `ItemTree` was created from.
85 pub fn top_level_items(&self) -> impl Iterator<Item = ModItem> + '_ { 85 pub fn top_level_items(&self) -> &[ModItem] {
86 self.top_level.iter().copied() 86 &self.top_level
87 } 87 }
88} 88}
89 89
@@ -120,7 +120,7 @@ impl_index!(
120); 120);
121 121
122/// A desugared `extern crate` or `use` import. 122/// A desugared `extern crate` or `use` import.
123#[derive(Debug, Eq, PartialEq)] 123#[derive(Debug, Clone, Eq, PartialEq)]
124pub struct Import { 124pub struct Import {
125 pub path: ModPath, 125 pub path: ModPath,
126 pub alias: Option<ImportAlias>, 126 pub alias: Option<ImportAlias>,
@@ -220,6 +220,12 @@ pub struct Mod {
220 pub items: Vec<ModItem>, 220 pub items: Vec<ModItem>,
221} 221}
222 222
223pub enum ModKind {
224 Inline { items: Vec<ModItem> },
225
226 Outline {},
227}
228
223#[derive(Debug, Eq, PartialEq)] 229#[derive(Debug, Eq, PartialEq)]
224pub struct MacroCall { 230pub struct MacroCall {
225 pub name: Option<Name>, 231 pub name: Option<Name>,