10
10
//! To initialize a `struct` with an in-place constructor you will need two things:
11
11
//! - an in-place constructor,
12
12
//! - 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).
14
14
//!
15
15
//! To get an in-place constructor there are generally three options:
16
16
//! - directly creating an in-place constructor using the [`pin_init!`] macro,
204
204
//! [structurally pinned fields]:
205
205
//! https://doc.rust-lang.org/std/pin/index.html#pinning-is-structural-for-field
206
206
//! [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
208
209
//! [`impl PinInit<Foo>`]: PinInit
209
210
//! [`impl PinInit<T, E>`]: PinInit
210
211
//! [`impl Init<T, E>`]: Init
@@ -661,7 +662,7 @@ macro_rules! stack_try_pin_init {
661
662
/// });
662
663
/// ```
663
664
///
664
- /// [`try_pin_init!`]: kernel ::try_pin_init
665
+ /// [`try_pin_init!`]: crate ::try_pin_init
665
666
/// [`NonNull<Self>`]: core::ptr::NonNull
666
667
// For a detailed example of how this macro works, see the module documentation of the hidden
667
668
// module `__internal` inside of `init/__internal.rs`.
@@ -885,7 +886,7 @@ macro_rules! assert_pinned {
885
886
/// A pin-initializer for the type `T`.
886
887
///
887
888
/// 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!`]).
889
890
///
890
891
/// Also see the [module description](self).
891
892
///
@@ -902,7 +903,8 @@ macro_rules! assert_pinned {
902
903
/// - `slot` is not partially initialized.
903
904
/// - while constructing the `T` at `slot` it upholds the pinning invariants of `T`.
904
905
///
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
906
908
#[ must_use = "An initializer must be used in order to create its value." ]
907
909
pub unsafe trait PinInit < T : ?Sized , E = Infallible > : Sized {
908
910
/// Initializes `slot`.
@@ -968,7 +970,7 @@ where
968
970
/// An initializer for `T`.
969
971
///
970
972
/// 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
972
974
/// [`PinInit<T, E>`] is a super trait, you can use every function that takes it as well.
973
975
///
974
976
/// Also see the [module description](self).
@@ -992,7 +994,8 @@ where
992
994
/// Contrary to its supertype [`PinInit<T, E>`] the caller is allowed to
993
995
/// move the pointee after initialization.
994
996
///
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
996
999
#[ must_use = "An initializer must be used in order to create its value." ]
997
1000
pub unsafe trait Init < T : ?Sized , E = Infallible > : PinInit < T , E > {
998
1001
/// Initializes `slot`.
@@ -1272,7 +1275,7 @@ pub trait InPlaceWrite<T> {
1272
1275
///
1273
1276
/// This trait must be implemented via the [`pinned_drop`] proc-macro attribute on the impl.
1274
1277
///
1275
- /// [`pinned_drop`]: kernel ::macros::pinned_drop
1278
+ /// [`pinned_drop`]: crate ::macros::pinned_drop
1276
1279
pub unsafe trait PinnedDrop : __internal:: HasPinData {
1277
1280
/// Executes the pinned destructor of this type.
1278
1281
///
0 commit comments