Skip to content

Commit

Permalink
rust: lock: Add intra-doc links to the Backend trait
Browse files Browse the repository at this point in the history
Add missing intra-doc links to the Backend trait to make navigating the
documentation easier.

Suggested-by: Alice Ryhl <[email protected]>
Signed-off-by: Ben Gooding <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
  • Loading branch information
Ben Gooding authored and ojeda committed Jul 19, 2023
1 parent fdf0eaf commit d89152b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rust/kernel/sync/lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ pub unsafe trait Backend {

/// A mutual exclusion primitive.
///
/// Exposes one of the kernel locking primitives. Which one is exposed depends on the lock backend
/// specified as the generic parameter `B`.
/// Exposes one of the kernel locking primitives. Which one is exposed depends on the lock
/// [`Backend`] specified as the generic parameter `B`.
#[pin_data]
pub struct Lock<T: ?Sized, B: Backend> {
/// The kernel lock object.
Expand Down Expand Up @@ -126,7 +126,7 @@ impl<T: ?Sized, B: Backend> Lock<T, B> {

/// A lock guard.
///
/// Allows mutual exclusion primitives that implement the `Backend` trait to automatically unlock
/// Allows mutual exclusion primitives that implement the [`Backend`] trait to automatically unlock
/// when a guard goes out of scope. It also provides a safe and convenient way to access the data
/// protected by the lock.
#[must_use = "the lock unlocks immediately when the guard is unused"]
Expand Down

0 comments on commit d89152b

Please sign in to comment.