]> git.proxmox.com Git - rustc.git/blame - src/tools/rustfmt/tests/source/issue-3434/lib.rs
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / rustfmt / tests / source / issue-3434 / lib.rs
CommitLineData
f20569fa
XL
1#![rustfmt::skip::macros(skip_macro_mod)]
2
3mod no_entry;
4
5#[rustfmt::skip::macros(html, skip_macro)]
6fn main() {
7 let macro_result1 = html! { <div>
8this should be skipped</div>
9 }
10 .to_string();
11
12 let macro_result2 = not_skip_macro! { <div>
13this should be mangled</div>
14 }
15 .to_string();
16
17 skip_macro! {
18this should be skipped
19};
20
21 foo();
22}
23
24fn foo() {
25 let macro_result1 = html! { <div>
26this should be mangled</div>
27 }
28 .to_string();
29}
30
31fn bar() {
32 let macro_result1 = skip_macro_mod! { <div>
33this should be skipped</div>
34 }
35 .to_string();
36}
37
38fn visitor_made_from_same_context() {
39 let pair = (
40 || {
41 foo!(<div>
42this should be mangled</div>
43 );
44 skip_macro_mod!(<div>
45this should be skipped</div>
46 );
47 },
48 || {
49 foo!(<div>
50this should be mangled</div>
51 );
52 skip_macro_mod!(<div>
53this should be skipped</div>
54 );
55 },
56 );
57}