Skip to content

Commit 1f64f40

Browse files
authored
Merge pull request rust-lang#3141 from dfyz/issue-2810
Try to fix formatting failures on Windows (issue rust-lang#2810)
2 parents bdd4049 + 00a20bc commit 1f64f40

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1347,7 +1347,7 @@ impl MacroBranch {
13471347
.fold(
13481348
(String::new(), true),
13491349
|(mut s, need_indent), (i, (kind, ref l))| {
1350-
if !l.is_empty()
1350+
if !is_empty_line(l)
13511351
&& need_indent
13521352
&& !new_body_snippet.is_line_non_formatted(i + 1)
13531353
{

tests/target/issue-2810.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// rustfmt-newline_style: Windows
2+
3+
#[macro_export]
4+
macro_rules! hmmm___ffi_error {
5+
($result:ident) => {
6+
pub struct $result {
7+
success: bool,
8+
}
9+
10+
impl $result {
11+
pub fn foo(self) {}
12+
}
13+
};
14+
}

0 commit comments

Comments
 (0)