Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit c6aeda7

Browse files
committed
Move use_self_macro into crashes/auxiliary
1 parent bf67fcf commit c6aeda7

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
macro_rules! use_self {
2+
(
3+
impl $ty:ident {
4+
fn func(&$this:ident) {
5+
[fields($($field:ident)*)]
6+
}
7+
}
8+
) => (
9+
impl $ty {
10+
fn func(&$this) {
11+
let $ty { $($field),* } = $this;
12+
}
13+
}
14+
)
15+
}

tests/ui/crashes/ice-4671.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![warn(clippy::use_self)]
22

33
#[macro_use]
4-
#[path = "../auxiliary/use_self_macro.rs"]
4+
#[path = "auxiliary/use_self_macro.rs"]
55
mod use_self_macro;
66

77
struct Foo {

0 commit comments

Comments
 (0)