Re: [PATCH 11/22] rust: pin-init: fix documentation links
From: Benno Lossin
Date: Wed Mar 05 2025 - 06:49:28 EST
On Wed Mar 5, 2025 at 12:37 PM CET, Andreas Hindborg wrote:
> "Benno Lossin" <benno.lossin@xxxxxxxxx> writes:
>
>> Before switching to compile the `pin-init` crate directly, change
>> any links that would be invalid to links that are valid both before and
>> after the switch.
>>
>> Signed-off-by: Benno Lossin <benno.lossin@xxxxxxxxx>
>> ---
>> rust/kernel/sync/condvar.rs | 2 +-
>> rust/pin-init/src/__internal.rs | 4 ++--
>> rust/pin-init/src/lib.rs | 19 +++++++++++--------
>> 3 files changed, 14 insertions(+), 11 deletions(-)
>>
>> diff --git a/rust/kernel/sync/condvar.rs b/rust/kernel/sync/condvar.rs
>> index 7df565038d7d..5aa7fa7c7002 100644
>> --- a/rust/kernel/sync/condvar.rs
>> +++ b/rust/kernel/sync/condvar.rs
>
> [...]
>
>> @@ -204,7 +204,8 @@
>> //! [structurally pinned fields]:
>> //! https://doc.rust-lang.org/std/pin/index.html#pinning-is-structural-for-field
>> //! [stack]: crate::stack_pin_init
>> -//! [`Arc<T>`]: crate::sync::Arc
>> +//! [`Arc<T>`]: ../kernel/sync/struct.Arc.html
>> +//! [`Box<T>`]: ../kernel/alloc/struct.KBox.html
>> //! [`impl PinInit<Foo>`]: PinInit
>> //! [`impl PinInit<T, E>`]: PinInit
>> //! [`impl Init<T, E>`]: Init
>
> Won't this diff from the user space implementation?
It's only an intermediate state, it will be changed again in "rust:
pin-init: add `std` and `alloc` support from the user-space version".
---
Cheers,
Benno