]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rust: pin-init: allow the crate to refer to itself as `pin-init` in doc tests
authorBenno Lossin <lossin@kernel.org>
Fri, 16 Jan 2026 10:54:17 +0000 (11:54 +0100)
committerBenno Lossin <lossin@kernel.org>
Sat, 17 Jan 2026 09:49:31 +0000 (10:49 +0100)
commit901f1d73d2c68017065212d75ffbfbffa119921e
tree36847bb1ff0d35595cb38b22429f5cdbeefd5465
parent61d62ab08f0e62f89929f3920c0b6521d849fd57
rust: pin-init: allow the crate to refer to itself as `pin-init` in doc tests

The `syn` approach requires use of `::pin_init::...` instead of the
`$crate::...` construct available to declarative macros. To be able to
use the `pin_init` crate from itself (which includes doc tests), we have
to declare it as such.

Reviewed-by: Gary Guo <gary@garyguo.net>
Tested-by: Andreas Hindborg <a.hindborg@kernel.org>
Signed-off-by: Benno Lossin <lossin@kernel.org>
rust/pin-init/src/lib.rs