Re: [PATCH] rust: sync: extend module documentation of aref
From: Miguel Ojeda
Date: Wed Jul 23 2025 - 06:52:16 EST
On Wed, Jul 23, 2025 at 12:25 PM Daniel Sedlak <daniel@xxxxxxxxxx> wrote:
>
> It got me curios. Why is it required to declare the doc reference for
> Arc and Arc<T>, but not ARef<MyType> and ARef<T>?
>
> Is it because ARef is in file scope but not the Arc?
>
> If so, you could just add
>
> use crate::sync::Arc;
That would be unused -- i.e. we don't add imports in the actual code
only for docs.
The compiler also warns about it (`unused_imports`).
Thanks!
Cheers,
Miguel