Skip to content

Commit 4449d4a

Browse files
committed
Adding draft test cases for issue rust-lang#4603
1 parent 367a874 commit 4449d4a

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

tests/source/issue-4603.rs

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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+
}

tests/target/issue-4603.rs

Whitespace-only changes.

0 commit comments

Comments
 (0)