aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-10-06 19:06:14 +0100
committerAleksey Kladov <[email protected]>2020-10-06 19:06:14 +0100
commitd7991f5f21c11d4d2498a3d2720fbfd490364d36 (patch)
tree5f37dcd9202f991ec40ca28b4a1653aa60697849 /crates
parent57735f2a32138d552c51c4b2de04bcd56650db15 (diff)
Document privacy invariant of SyntaxPtr
Diffstat (limited to 'crates')
-rw-r--r--crates/syntax/src/ptr.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/syntax/src/ptr.rs b/crates/syntax/src/ptr.rs
index ca7957747..d3fb7a5d9 100644
--- a/crates/syntax/src/ptr.rs
+++ b/crates/syntax/src/ptr.rs
@@ -12,6 +12,8 @@ use crate::{AstNode, SyntaxKind, SyntaxNode, TextRange};
12/// specific node across reparses of the same file. 12/// specific node across reparses of the same file.
13#[derive(Debug, Clone, PartialEq, Eq, Hash)] 13#[derive(Debug, Clone, PartialEq, Eq, Hash)]
14pub struct SyntaxNodePtr { 14pub struct SyntaxNodePtr {
15 // Don't expose this field further. At some point, we might want to replace
16 // range with node id.
15 pub(crate) range: TextRange, 17 pub(crate) range: TextRange,
16 kind: SyntaxKind, 18 kind: SyntaxKind,
17} 19}