]> git.lizzy.rs Git - rust.git/commitdiff
Document privacy invariant of SyntaxPtr
authorAleksey Kladov <aleksey.kladov@gmail.com>
Tue, 6 Oct 2020 18:06:14 +0000 (20:06 +0200)
committerAleksey Kladov <aleksey.kladov@gmail.com>
Tue, 6 Oct 2020 18:06:14 +0000 (20:06 +0200)
crates/syntax/src/ptr.rs

index ca79577471321414ba7da95bfdde01e8f0cb7177..d3fb7a5d98f1e8717d70c20ac2eb22d247c9b0e0 100644 (file)
@@ -12,6 +12,8 @@
 /// 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,
 }