diff options
author | Miguel Ojeda <ojeda@kernel.org> | 2023-07-18 07:27:49 +0200 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2023-07-19 09:32:41 -0600 |
commit | bfa7dff036f0cbb2ccb0385c8b666204d6b8eb3a (patch) | |
tree | b620935c27815fe54deecfb9a705af5cc1140eac /rust/kernel/sync/lock/mutex.rs | |
parent | cf36a495f07059d23d62640a3f7b6b157da1bfa0 (diff) |
rust: sync: make doctests compilable/testable
Rust documentation tests are going to be build/run-tested
with the KUnit integration added in a future patch, thus
update them to make them compilable/testable so that we
may start enforcing it.
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'rust/kernel/sync/lock/mutex.rs')
-rw-r--r-- | rust/kernel/sync/lock/mutex.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/rust/kernel/sync/lock/mutex.rs b/rust/kernel/sync/lock/mutex.rs index 923472f04af4..09276fedc091 100644 --- a/rust/kernel/sync/lock/mutex.rs +++ b/rust/kernel/sync/lock/mutex.rs @@ -63,6 +63,7 @@ macro_rules! new_mutex { /// assert_eq!(e.c, 10); /// assert_eq!(e.d.lock().a, 20); /// assert_eq!(e.d.lock().b, 30); +/// # Ok::<(), Error>(()) /// ``` /// /// The following example shows how to use interior mutability to modify the contents of a struct |