diff options
Diffstat (limited to 'crates/ra_hir/src/lib.rs')
-rw-r--r-- | crates/ra_hir/src/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_hir/src/lib.rs b/crates/ra_hir/src/lib.rs index e7b6a81f4..0f84b2d61 100644 --- a/crates/ra_hir/src/lib.rs +++ b/crates/ra_hir/src/lib.rs | |||
@@ -131,6 +131,10 @@ impl SourceFileItems { | |||
131 | .unwrap(); | 131 | .unwrap(); |
132 | id | 132 | id |
133 | } | 133 | } |
134 | pub fn id_of_source_file(&self) -> SourceFileItemId { | ||
135 | let (id, _syntax) = self.arena.iter().next().unwrap(); | ||
136 | id | ||
137 | } | ||
134 | } | 138 | } |
135 | 139 | ||
136 | impl Index<SourceFileItemId> for SourceFileItems { | 140 | impl Index<SourceFileItemId> for SourceFileItems { |