diff options
Diffstat (limited to 'crates/ra_analysis/src/symbol_index.rs')
-rw-r--r-- | crates/ra_analysis/src/symbol_index.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_analysis/src/symbol_index.rs b/crates/ra_analysis/src/symbol_index.rs index edb2268fb..56a84a850 100644 --- a/crates/ra_analysis/src/symbol_index.rs +++ b/crates/ra_analysis/src/symbol_index.rs | |||
@@ -125,14 +125,14 @@ fn is_type(kind: SyntaxKind) -> bool { | |||
125 | } | 125 | } |
126 | 126 | ||
127 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 127 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
128 | pub struct FileSymbol { | 128 | pub(crate) struct FileSymbol { |
129 | pub name: SmolStr, | 129 | pub(crate) name: SmolStr, |
130 | pub node_range: TextRange, | 130 | pub(crate) node_range: TextRange, |
131 | pub kind: SyntaxKind, | 131 | pub(crate) kind: SyntaxKind, |
132 | } | 132 | } |
133 | 133 | ||
134 | impl FileSymbol { | 134 | impl FileSymbol { |
135 | pub fn docs(&self, file: &SourceFileNode) -> Option<String> { | 135 | pub(crate) fn docs(&self, file: &SourceFileNode) -> Option<String> { |
136 | file.syntax() | 136 | file.syntax() |
137 | .descendants() | 137 | .descendants() |
138 | .filter(|node| node.kind() == self.kind && node.range() == self.node_range) | 138 | .filter(|node| node.kind() == self.kind && node.range() == self.node_range) |
@@ -162,7 +162,7 @@ impl FileSymbol { | |||
162 | /// Get a description of this node. | 162 | /// Get a description of this node. |
163 | /// | 163 | /// |
164 | /// e.g. `struct Name`, `enum Name`, `fn Name` | 164 | /// e.g. `struct Name`, `enum Name`, `fn Name` |
165 | pub fn description(&self, file: &SourceFileNode) -> Option<String> { | 165 | pub(crate) fn description(&self, file: &SourceFileNode) -> Option<String> { |
166 | // TODO: After type inference is done, add type information to improve the output | 166 | // TODO: After type inference is done, add type information to improve the output |
167 | file.syntax() | 167 | file.syntax() |
168 | .descendants() | 168 | .descendants() |