From d7991f5f21c11d4d2498a3d2720fbfd490364d36 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 6 Oct 2020 20:06:14 +0200 Subject: Document privacy invariant of SyntaxPtr --- crates/syntax/src/ptr.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'crates/syntax/src') 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}; /// specific node across reparses of the same file. #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct SyntaxNodePtr { + // Don't expose this field further. At some point, we might want to replace + // range with node id. pub(crate) range: TextRange, kind: SyntaxKind, } -- cgit v1.2.3