Skip to content

Commit 1f0475a

Browse files
committed
fixup! rust: sync: Classless Lock::new() and pin_init()
1 parent ea6cf3f commit 1f0475a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

rust/kernel/sync/lock.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ impl<T, B: Backend> Lock<T, B> {
121121
}
122122

123123
/// Constructs a new lock initialiser taking an initialiser/
124+
#[track_caller]
124125
pub fn pin_init<E>(t: impl PinInit<T, E>) -> impl PinInit<Self, E>
125126
where
126127
E: core::convert::From<core::convert::Infallible>,
@@ -130,14 +131,14 @@ impl<T, B: Backend> Lock<T, B> {
130131
}
131132

132133
/// Constructs a new lock initialiser.
133-
#[allow(clippy::new_ret_no_self)]
134134
#[track_caller]
135135
pub fn new_named(t: T, name: &'static CStr) -> impl PinInit<Self> {
136136
let (key, _) = caller_lock_class();
137137
Self::new_with_key(t, name, key)
138138
}
139139

140140
/// Constructs a new lock initialiser taking an initialiser/
141+
#[track_caller]
141142
pub fn pin_init_named<E>(t: impl PinInit<T, E>, name: &'static CStr) -> impl PinInit<Self, E>
142143
where
143144
E: core::convert::From<core::convert::Infallible>,

0 commit comments

Comments
 (0)