Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 4a82252

Browse files
committed
missed-spans: Fix bogus check.
I don't really know what it's trying to do, but forgetting about everything you've seen before when you see whitespace followed by a semicolon doesn't look right to me, and absolutely no tests were hitting that. This check was introduced in 5ecdd07, however it was wrong even at that point, and now rustfmt still passes that test, regardless of macro name. Fixes rust-lang#3154.
1 parent 7bf0d30 commit 4a82252

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/missed_spans.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,6 @@ impl<'a> FmtVisitor<'a> {
308308
status.line_start = i + 1;
309309
} else if c.is_whitespace() && status.last_wspace.is_none() {
310310
status.last_wspace = Some(i);
311-
} else if c == ';' && status.last_wspace.is_some() {
312-
status.line_start = i;
313-
status.last_wspace = None;
314311
} else {
315312
status.last_wspace = None;
316313
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// rustfmt-reorder_imports: false
2+
3+
pub use self :: super :: super :: super :: root::mozilla::detail::StringClassFlags as nsTStringRepr_ClassFlags ;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// rustfmt-reorder_imports: false
2+
3+
pub use self :: super :: super :: super :: root::mozilla::detail::StringClassFlags as nsTStringRepr_ClassFlags ;

0 commit comments

Comments
 (0)