]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
rust: arc: fix intra-doc link in `Arc<T>::init`
authorMiguel Ojeda <ojeda@kernel.org>
Tue, 18 Apr 2023 21:43:46 +0000 (23:43 +0200)
committerMiguel Ojeda <ojeda@kernel.org>
Wed, 31 May 2023 14:12:06 +0000 (16:12 +0200)
commiteed7a146b86cf95441d5563c7a99cd02f8a6c3a4
tree681af5c11f265698ad3339edc6a45a66f4be6c63
parentf438c1dd9ec2687b9d1e72e36cc44318634671a0
rust: arc: fix intra-doc link in `Arc<T>::init`

`Arc<T>::init` refers to `Arc<T>::pin_init` via an intra-doc link
using the text `pin_init`, rather than more explicitly, which makes
`rustdoc` point it to the `pin_init!` macro instead.

This is required for the compiler upgrade since the newer `rustdoc`
would trigger the `broken_intra_doc_links` lint [1], but in this case
the macro was not the intended target to begin with, and so the actual
fix is to make it point to the right place, regardless of the upgrade.

Thus make it more explicit.

Fixes: 92c4a1e7e81c ("rust: init/sync: add `InPlaceInit` trait to pin-initialize smart pointers")
Link: https://github.com/rust-lang/rust/issues/106142
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Benno Lossin <benno.lossin@proton.me>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Tested-by: Ariel Miculas <amiculas@cisco.com>
Tested-by: David Gow <davidgow@google.com>
Tested-by: Boqun Feng <boqun.feng@gmail.com>
Link: https://lore.kernel.org/r/20230418214347.324156-3-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/kernel/sync/arc.rs