Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/syntax/src/ptr.rs')
| -rw-r--r-- | crates/syntax/src/ptr.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/syntax/src/ptr.rs b/crates/syntax/src/ptr.rs index c4979b8e3a..ed8a68fb8a 100644 --- a/crates/syntax/src/ptr.rs +++ b/crates/syntax/src/ptr.rs @@ -21,7 +21,7 @@ use crate::{AstNode, SyntaxNode, syntax_node::RustLanguage}; /// A "pointer" to a [`SyntaxNode`], via location in the source code. pub type SyntaxNodePtr = rowan::ast::SyntaxNodePtr<RustLanguage>; -/// Like `SyntaxNodePtr`, but remembers the type of node. +/// Like [`SyntaxNodePtr`], but remembers the type of node. pub struct AstPtr<N: AstNode> { raw: SyntaxNodePtr, _ty: PhantomData<fn() -> N>, @@ -90,7 +90,7 @@ impl<N: AstNode> AstPtr<N> { AstPtr { raw: self.raw, _ty: PhantomData } } - /// Like `SyntaxNodePtr::cast` but the trait bounds work out. + /// Like [`SyntaxNodePtr::cast`] but the trait bounds work out. pub fn try_from_raw(raw: SyntaxNodePtr) -> Option<AstPtr<N>> { N::can_cast(raw.kind()).then_some(AstPtr { raw, _ty: PhantomData }) } |