mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 15:11:30 +00:00
29 lines
436 B
Rust
29 lines
436 B
Rust
#[derive(Clone)]
|
|
pub struct Custom;
|
|
|
|
impl Custom {
|
|
pub fn wake(self) {}
|
|
}
|
|
|
|
macro_rules! mac {
|
|
($cx:ident) => {
|
|
$cx.waker()
|
|
};
|
|
}
|
|
|
|
pub fn wake(cx: &mut std::task::Context) {
|
|
cx.waker().wake_by_ref();
|
|
|
|
mac!(cx).wake_by_ref();
|
|
}
|
|
|
|
pub fn no_lint(cx: &mut std::task::Context, c: &Custom) {
|
|
c.clone().wake();
|
|
|
|
let w = cx.waker().clone();
|
|
w.wake();
|
|
|
|
cx.waker().clone().wake_by_ref();
|
|
}
|
|
|
|
fn main() {}
|