blob: 2fd7aea21c7582ea8b9cc106fd454edfa3cbce68 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
#![rustfmt::skip::macros(skip_macro_mod)]
mod no_entry;
#[rustfmt::skip::macros(html, skip_macro)]
fn main() {
let macro_result1 = html! { <div>
this should be skipped</div>
}
.to_string();
let macro_result2 = not_skip_macro! { <div>
this should be mangled</div>
}
.to_string();
skip_macro! {
this should be skipped
};
foo();
}
fn foo() {
let macro_result1 = html! { <div>
this should be mangled</div>
}
.to_string();
}
fn bar() {
let macro_result1 = skip_macro_mod! { <div>
this should be skipped</div>
}
.to_string();
}
fn visitor_made_from_same_context() {
let pair = (
|| {
foo!(<div>
this should be mangled</div>
);
skip_macro_mod!(<div>
this should be skipped</div>
);
},
|| {
foo!(<div>
this should be mangled</div>
);
skip_macro_mod!(<div>
this should be skipped</div>
);
},
);
}
|