1
Fork 0
mirror of https://github.com/RGBCube/cstree synced 2025-07-27 09:07:44 +00:00

Clean up redundant doc links (#62)

This commit is contained in:
DQ 2023-09-03 14:10:39 +02:00 committed by GitHub
parent 3606ac007a
commit b793b75f23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 9 deletions

View file

@ -167,7 +167,7 @@ impl fmt::Debug for TokenKey {
}
}
/// Constructs a new, single-threaded [`Interner`](traits::Interner).
/// Constructs a new, single-threaded [`Interner`].
///
/// If you need the interner to be multi-threaded, see [`new_threaded_interner`].
#[inline]
@ -175,7 +175,7 @@ pub fn new_interner() -> TokenInterner {
TokenInterner::new()
}
/// Constructs a new [`Interner`](traits::Interner) that can be used across multiple threads.
/// Constructs a new [`Interner`] that can be used across multiple threads.
///
/// Note that you can use `&MultiThreadTokenInterner` to access interning methods through a shared reference, as well as
/// construct new syntax trees. See [the module documentation](self) for more information and examples.

View file

@ -117,15 +117,15 @@ impl<S: Syntax, D> SyntaxNode<S, D> {
}
}
/// Turns this node into a [`ResolvedNode`](crate::syntax::ResolvedNode), but only if there is a resolver associated
/// with this tree.
/// Turns this node into a [`ResolvedNode`], but only if there is a resolver associated with
/// this tree.
#[inline]
pub fn try_resolved(&self) -> Option<&ResolvedNode<S, D>> {
// safety: we only coerce if `resolver` exists
self.resolver().map(|_| unsafe { ResolvedNode::coerce_ref(self) })
}
/// Turns this node into a [`ResolvedNode`](crate::syntax::ResolvedNode).
/// Turns this node into a [`ResolvedNode`].
/// # Panics
/// If there is no resolver associated with this tree.
#[inline]

View file

@ -111,8 +111,8 @@ impl<S: Syntax, D> DerefMut for ResolvedToken<S, D> {
/// An element of the tree that is guaranteed to belong to a tree that contains an associated
/// [`Resolver`](lasso::Resolver), can be either a node or a token.
/// # See also
/// [`SyntaxElement`](crate::syntax::SyntaxElement)
///
/// See also [`SyntaxElement`].
pub type ResolvedElement<S, D = ()> = NodeOrToken<ResolvedNode<S, D>, ResolvedToken<S, D>>;
impl<S: Syntax, D> From<ResolvedNode<S, D>> for ResolvedElement<S, D> {

View file

@ -110,7 +110,7 @@ impl<S: Syntax, D> SyntaxToken<S, D> {
self.parent.resolver()
}
/// Turns this token into a [`ResolvedToken`](crate::syntax::ResolvedToken), but only if there is a resolver
/// Turns this token into a [`ResolvedToken`], but only if there is a resolver
/// associated with this tree.
#[inline]
pub fn try_resolved(&self) -> Option<&ResolvedToken<S, D>> {
@ -118,7 +118,7 @@ impl<S: Syntax, D> SyntaxToken<S, D> {
self.resolver().map(|_| unsafe { ResolvedToken::coerce_ref(self) })
}
/// Turns this token into a [`ResolvedToken`](crate::syntax::ResolvedToken).
/// Turns this token into a [`ResolvedToken`].
/// # Panics
/// If there is no resolver associated with this tree.
#[inline]