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 5ecdd072d6, however
it was wrong even at that point, and now rustfmt still passes that test,
regardless of macro name.
Fixes #3154.
This commit is contained in:
parent
7bf0d308f8
commit
4a82252f03
3 changed files with 6 additions and 3 deletions
|
|
@ -308,9 +308,6 @@ impl<'a> FmtVisitor<'a> {
|
|||
status.line_start = i + 1;
|
||||
} else if c.is_whitespace() && status.last_wspace.is_none() {
|
||||
status.last_wspace = Some(i);
|
||||
} else if c == ';' && status.last_wspace.is_some() {
|
||||
status.line_start = i;
|
||||
status.last_wspace = None;
|
||||
} else {
|
||||
status.last_wspace = None;
|
||||
}
|
||||
|
|
|
|||
3
tests/source/long-use-statement-issue-3154.rs
Normal file
3
tests/source/long-use-statement-issue-3154.rs
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
// rustfmt-reorder_imports: false
|
||||
|
||||
pub use self :: super :: super :: super :: root::mozilla::detail::StringClassFlags as nsTStringRepr_ClassFlags ;
|
||||
3
tests/target/long-use-statement-issue-3154.rs
Normal file
3
tests/target/long-use-statement-issue-3154.rs
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
// rustfmt-reorder_imports: false
|
||||
|
||||
pub use self :: super :: super :: super :: root::mozilla::detail::StringClassFlags as nsTStringRepr_ClassFlags ;
|
||||
Loading…
Add table
Add a link
Reference in a new issue