Clean up references in doc comments (#3983)

This PR cleans up a number of references in doc comments so that
`rustdoc` will link and display them correctly.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-01-09 14:48:48 -05:00 committed by GitHub
parent 00c3afd330
commit 74dadd68d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 50 additions and 48 deletions

View file

@ -31,14 +31,14 @@ pub trait IntoElement: Sized {
/// The specific type of element into which the implementing type is converted.
type Element: Element;
/// The [ElementId] of self once converted into an [Element].
/// The [`ElementId`] of self once converted into an [`Element`].
/// If present, the resulting element's state will be carried across frames.
fn element_id(&self) -> Option<ElementId>;
/// Convert self into a type that implements [Element].
/// Convert self into a type that implements [`Element`].
fn into_element(self) -> Self::Element;
/// Convert self into a dynamically-typed [AnyElement].
/// Convert self into a dynamically-typed [`AnyElement`].
fn into_any_element(self) -> AnyElement {
self.into_element().into_any()
}
@ -115,7 +115,7 @@ pub trait Render: 'static + Sized {
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement;
}
/// You can derive [IntoElement] on any type that implements this trait.
/// You can derive [`IntoElement`] on any type that implements this trait.
/// It is used to allow views to be expressed in terms of abstract data.
pub trait RenderOnce: 'static {
fn render(self, cx: &mut WindowContext) -> impl IntoElement;
@ -224,7 +224,7 @@ enum ElementDrawPhase<S> {
},
}
/// A wrapper around an implementer of [Element] that allows it to be drawn in a window.
/// A wrapper around an implementer of [`Element`] that allows it to be drawn in a window.
impl<E: Element> DrawableElement<E> {
fn new(element: E) -> Self {
DrawableElement {