1010//! To initialize a `struct` with an in-place constructor you will need two things:
1111//! - an in-place constructor,
1212//! - a memory location that can hold your `struct` (this can be the [stack], an [`Arc<T>`],
13- //! [`KBox <T>`] or any other smart pointer that supports this library).
13+ //! [`Box <T>`] or any other smart pointer that supports this library).
1414//!
1515//! To get an in-place constructor there are generally three options:
1616//! - directly creating an in-place constructor using the [`pin_init!`] macro,
204204//! [structurally pinned fields]:
205205//! https://doc.rust-lang.org/std/pin/index.html#pinning-is-structural-for-field
206206//! [stack]: crate::stack_pin_init
207- //! [`Arc<T>`]: crate::sync::Arc
207+ //! [`Arc<T>`]: https://rust.docs.kernel.org/kernel/sync/struct.Arc.html
208+ //! [`Box<T>`]: https://rust.docs.kernel.org/kernel/alloc/kbox/struct.Box.html
208209//! [`impl PinInit<Foo>`]: PinInit
209210//! [`impl PinInit<T, E>`]: PinInit
210211//! [`impl Init<T, E>`]: Init
@@ -661,7 +662,7 @@ macro_rules! stack_try_pin_init {
661662/// });
662663/// ```
663664///
664- /// [`try_pin_init!`]: kernel ::try_pin_init
665+ /// [`try_pin_init!`]: crate ::try_pin_init
665666/// [`NonNull<Self>`]: core::ptr::NonNull
666667// For a detailed example of how this macro works, see the module documentation of the hidden
667668// module `__internal` inside of `init/__internal.rs`.
@@ -885,7 +886,7 @@ macro_rules! assert_pinned {
885886/// A pin-initializer for the type `T`.
886887///
887888/// To use this initializer, you will need a suitable memory location that can hold a `T`. This can
888- /// be [`KBox <T>`], [`Arc<T>`] or even the stack (see [`stack_pin_init!`]).
889+ /// be [`Box <T>`], [`Arc<T>`] or even the stack (see [`stack_pin_init!`]).
889890///
890891/// Also see the [module description](self).
891892///
@@ -902,7 +903,8 @@ macro_rules! assert_pinned {
902903/// - `slot` is not partially initialized.
903904/// - while constructing the `T` at `slot` it upholds the pinning invariants of `T`.
904905///
905- /// [`Arc<T>`]: crate::sync::Arc
906+ /// [`Arc<T>`]: https://rust.docs.kernel.org/kernel/sync/struct.Arc.html
907+ /// [`Box<T>`]: https://rust.docs.kernel.org/kernel/alloc/kbox/struct.Box.html
906908#[ must_use = "An initializer must be used in order to create its value." ]
907909pub unsafe trait PinInit < T : ?Sized , E = Infallible > : Sized {
908910 /// Initializes `slot`.
@@ -968,7 +970,7 @@ where
968970/// An initializer for `T`.
969971///
970972/// To use this initializer, you will need a suitable memory location that can hold a `T`. This can
971- /// be [`KBox <T>`], [`Arc<T>`] or even the stack (see [`stack_pin_init!`]). Because
973+ /// be [`Box <T>`], [`Arc<T>`] or even the stack (see [`stack_pin_init!`]). Because
972974/// [`PinInit<T, E>`] is a super trait, you can use every function that takes it as well.
973975///
974976/// Also see the [module description](self).
@@ -992,7 +994,8 @@ where
992994/// Contrary to its supertype [`PinInit<T, E>`] the caller is allowed to
993995/// move the pointee after initialization.
994996///
995- /// [`Arc<T>`]: crate::sync::Arc
997+ /// [`Arc<T>`]: https://rust.docs.kernel.org/kernel/sync/struct.Arc.html
998+ /// [`Box<T>`]: https://rust.docs.kernel.org/kernel/alloc/kbox/struct.Box.html
996999#[ must_use = "An initializer must be used in order to create its value." ]
9971000pub unsafe trait Init < T : ?Sized , E = Infallible > : PinInit < T , E > {
9981001 /// Initializes `slot`.
@@ -1272,7 +1275,7 @@ pub trait InPlaceWrite<T> {
12721275///
12731276/// This trait must be implemented via the [`pinned_drop`] proc-macro attribute on the impl.
12741277///
1275- /// [`pinned_drop`]: kernel ::macros::pinned_drop
1278+ /// [`pinned_drop`]: crate ::macros::pinned_drop
12761279pub unsafe trait PinnedDrop : __internal:: HasPinData {
12771280 /// Executes the pinned destructor of this type.
12781281 ///
0 commit comments