rust/tests/ui/crashes/auxiliary/use_self_macro.rs

16 lines
300 B
Rust
Raw Normal View History

macro_rules! use_self {
(
impl $ty:ident {
fn func(&$this:ident) {
[fields($($field:ident)*)]
}
}
) => (
impl $ty {
fn func(&$this) {
let $ty { $($field),* } = $this;
}
}
)
}