Skip to content

Commit 00b2470

Browse files
committed
Add test cases for fixed issues
The cases with `hard_tabs: true` were fixed in 2836f9b. Not sure about the rest, but this suggests a number of open issues are already resolved. Closes #3608 Closes #3550 Closes #3638 Closes #3858 Closes #3936
1 parent 99edc88 commit 00b2470

File tree

5 files changed

+94
-0
lines changed

5 files changed

+94
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// rustfmt-hard_tabs: true
2+
3+
macro_rules! foo {
4+
($bar: expr, $t: ty) => {
5+
$bar(|x| {
6+
if x {
7+
None;
8+
None
9+
} else {
10+
None;
11+
None
12+
}
13+
})
14+
};
15+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
fn main() {
2+
assert(
3+
long()
4+
.long()
5+
.long()
6+
.long()
7+
.long()
8+
.long()
9+
.long()
10+
.long()
11+
.long()
12+
.long()
13+
.long()
14+
.long()
15+
.long()
16+
.long()
17+
.long()
18+
.long(),
19+
);
20+
21+
assert!(
22+
long()
23+
.long()
24+
.long()
25+
.long()
26+
.long()
27+
.long()
28+
.long()
29+
.long()
30+
.long()
31+
.long()
32+
.long()
33+
.long()
34+
.long()
35+
.long()
36+
.long()
37+
.long(),
38+
);
39+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
macro_rules! abait {
2+
($x:expr) => {
3+
Ok(())
4+
};
5+
}
6+
7+
mod a {
8+
fn foo() -> Result<(), ()> {
9+
unsafe {
10+
(
11+
abait!(
12+
proxy.load_account(ahc_client_end, TEST_ACCOUNT_ID.clone().as_mut().into())
13+
)?,
14+
(),
15+
)
16+
};
17+
Ok(())
18+
}
19+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// rustfmt-hard_tabs: true
2+
3+
macro_rules! member_mut {
4+
($self:expr, $member:expr) => {{
5+
use self::Member::*;
6+
let r = &mut *$self;
7+
match $member {
8+
A => &mut r.a,
9+
B => &mut r.b,
10+
}
11+
}};
12+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// rustfmt-hard_tabs: true
2+
3+
macro_rules! m {
4+
($a:expr) => {
5+
if $a {
6+
return;
7+
}
8+
};
9+
}

0 commit comments

Comments
 (0)