Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rust: list: fix path of `assert_pinned!`

Commit dbd5058ba60c ("rust: make pin-init its own crate") moved all
items from pin-init into the pin-init crate, including the
`assert_pinned!` macro.

Thus fix the path of the sole user of the `assert_pinned!` macro.

This occurrence was missed in the commit above, since it is in a macro
rule that has no current users (although binder is a future user).

Cc: stable@kernel.org
Fixes: dbd5058ba60c ("rust: make pin-init its own crate")
Signed-off-by: Benno Lossin <lossin@kernel.org>
Link: https://lore.kernel.org/r/20250525173450.853413-1-lossin@kernel.org
[ Reworded slightly as discussed in the list. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

authored by

Benno Lossin and committed by
Miguel Ojeda
eb71feaa f4daa80d

+1 -1
+1 -1
rust/kernel/list/arc.rs
··· 96 96 } $($rest:tt)*) => { 97 97 impl$(<$($generics)*>)? $crate::list::ListArcSafe<$num> for $t { 98 98 unsafe fn on_create_list_arc_from_unique(self: ::core::pin::Pin<&mut Self>) { 99 - $crate::assert_pinned!($t, $field, $fty, inline); 99 + ::pin_init::assert_pinned!($t, $field, $fty, inline); 100 100 101 101 // SAFETY: This field is structurally pinned as per the above assertion. 102 102 let field = unsafe {