Skip to content

Commit

Permalink
Move use_self_macro into crashes/auxiliary
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Jan 3, 2020
1 parent bf67fcf commit c6aeda7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions tests/ui/crashes/auxiliary/use_self_macro.rs
Original file line number Diff line number Diff line change
@@ -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;
}
}
)
}
2 changes: 1 addition & 1 deletion tests/ui/crashes/ice-4671.rs
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down

0 comments on commit c6aeda7

Please sign in to comment.