]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/target/issue-4603.rs
Merge commit '0c89065b934397b62838fe3e4ef6f6352fc52daf' into libgccjit-codegen
[rust.git] / src / tools / rustfmt / tests / target / issue-4603.rs
1 // Formatting when original macro snippet is used
2
3 // Original issue #4603 code
4 #![feature(or_patterns)]
5 macro_rules! t_or_f {
6     () => {
7         (true // some comment
8         | false)
9     };
10 }
11
12 // Other test cases variations
13 macro_rules! RULES {
14     () => {
15         (
16                 xxxxxxx // COMMENT
17         | yyyyyyy
18         )
19     };
20 }
21 macro_rules! RULES {
22     () => {
23         (xxxxxxx // COMMENT
24             | yyyyyyy)
25     };
26 }
27
28 fn main() {
29     macro_rules! RULES {
30                 () => {
31                         (xxxxxxx // COMMENT
32                         | yyyyyyy)
33                 };
34         }
35 }
36
37 macro_rules! RULES {
38     () => {
39         (xxxxxxx /* COMMENT */ | yyyyyyy)
40     };
41 }
42 macro_rules! RULES {
43     () => {
44         (xxxxxxx /* COMMENT */
45         | yyyyyyy)
46     };
47 }