Move use_self_macro
into crashes/auxiliary
This commit is contained in:
parent
bf67fcf5a9
commit
c6aeda7bd5
15
tests/ui/crashes/auxiliary/use_self_macro.rs
Normal file
15
tests/ui/crashes/auxiliary/use_self_macro.rs
Normal file
@ -0,0 +1,15 @@
|
||||
macro_rules! use_self {
|
||||
(
|
||||
impl $ty:ident {
|
||||
fn func(&$this:ident) {
|
||||
[fields($($field:ident)*)]
|
||||
}
|
||||
}
|
||||
) => (
|
||||
impl $ty {
|
||||
fn func(&$this) {
|
||||
let $ty { $($field),* } = $this;
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
#![warn(clippy::use_self)]
|
||||
|
||||
#[macro_use]
|
||||
#[path = "../auxiliary/use_self_macro.rs"]
|
||||
#[path = "auxiliary/use_self_macro.rs"]
|
||||
mod use_self_macro;
|
||||
|
||||
struct Foo {
|
||||
|
Loading…
Reference in New Issue
Block a user