Skip to content

Commit d7991f5

Browse files
committed
Document privacy invariant of SyntaxPtr
1 parent 57735f2 commit d7991f5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crates/syntax/src/ptr.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ use crate::{AstNode, SyntaxKind, SyntaxNode, TextRange};
1212
/// specific node across reparses of the same file.
1313
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1414
pub struct SyntaxNodePtr {
15+
// Don't expose this field further. At some point, we might want to replace
16+
// range with node id.
1517
pub(crate) range: TextRange,
1618
kind: SyntaxKind,
1719
}

0 commit comments

Comments
 (0)