diff options
| author | Ashutosh Desai <ashutoshdesai993@gmail.com> | 2026-05-02 19:00:57 +0300 |
|---|---|---|
| committer | Miguel Ojeda <ojeda@kernel.org> | 2026-06-04 23:22:33 +0300 |
| commit | 03e8578813157c74d9f7033bd797b3939f2facd6 (patch) | |
| tree | 068124b6c426ac2170dea65cd26a1ac0b2505d72 /include/linux | |
| parent | 7594302d9ddd9f198173a658250e7b7debc6ed76 (diff) | |
| download | linux-03e8578813157c74d9f7033bd797b3939f2facd6.tar.xz | |
rust: sync: add #[must_use] to GlobalGuard and GlobalLock::try_lock
Guard is marked #[must_use] since dropping it releases the lock. GlobalGuard
wraps Guard with identical semantics but was missing the annotation, so
discarding it would silently compile without warning.
Similarly, GlobalLock::try_lock was missing #[must_use]. Option<T> does not
propagate #[must_use] from T, so the attribute needs to be on the function
directly - same reason Lock::try_lock has it.
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Ashutosh Desai <ashutoshdesai993@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260502160057.3402896-1-ashutoshdesai993@gmail.com
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
