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