diff options
-rw-r--r-- | crates/ra_analysis/src/syntax_ptr.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_analysis/src/syntax_ptr.rs b/crates/ra_analysis/src/syntax_ptr.rs index 563a010d7..c3c904633 100644 --- a/crates/ra_analysis/src/syntax_ptr.rs +++ b/crates/ra_analysis/src/syntax_ptr.rs | |||
@@ -24,7 +24,7 @@ fn resolve_syntax_ptr(db: &impl SyntaxDatabase, ptr: SyntaxPtr) -> SyntaxNode { | |||
24 | } | 24 | } |
25 | 25 | ||
26 | /// SyntaxPtr is a cheap `Copy` id which identifies a particular syntax node, | 26 | /// SyntaxPtr is a cheap `Copy` id which identifies a particular syntax node, |
27 | /// without retainig syntax tree in memory. You need to explicitelly `resovle` | 27 | /// without retaining syntax tree in memory. You need to explicitly `resolve` |
28 | /// `SyntaxPtr` to get a `SyntaxNode` | 28 | /// `SyntaxPtr` to get a `SyntaxNode` |
29 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | 29 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] |
30 | pub(crate) struct SyntaxPtr { | 30 | pub(crate) struct SyntaxPtr { |
@@ -81,7 +81,7 @@ impl LocalSyntaxPtr { | |||
81 | } | 81 | } |
82 | curr = curr.children() | 82 | curr = curr.children() |
83 | .find(|it| self.range.is_subrange(&it.range())) | 83 | .find(|it| self.range.is_subrange(&it.range())) |
84 | .unwrap_or_else(|| panic!("can't resovle local ptr to SyntaxNode: {:?}", self)) | 84 | .unwrap_or_else(|| panic!("can't resolve local ptr to SyntaxNode: {:?}", self)) |
85 | } | 85 | } |
86 | } | 86 | } |
87 | 87 | ||