mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 21:53:23 +00:00
16 lines
300 B
Rust
16 lines
300 B
Rust
|
macro_rules! use_self {
|
||
|
(
|
||
|
impl $ty:ident {
|
||
|
fn func(&$this:ident) {
|
||
|
[fields($($field:ident)*)]
|
||
|
}
|
||
|
}
|
||
|
) => (
|
||
|
impl $ty {
|
||
|
fn func(&$this) {
|
||
|
let $ty { $($field),* } = $this;
|
||
|
}
|
||
|
}
|
||
|
)
|
||
|
}
|