-
Notifications
You must be signed in to change notification settings - Fork 898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed first comment and last comment not reordering issue #4504
Open
whizsid
wants to merge
4
commits into
rust-lang:rustfmt-2.0.0-rc.2
Choose a base branch
from
whizsid:use_cmnt_order
base: rustfmt-2.0.0-rc.2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
9c63115
Fixed first comment and last comment not reordering issue
whizsid b5f9f5c
Merge branch 'master' of https://github.com/rust-lang/rustfmt into us…
whizsid c52c000
Added new tests and improve readability
whizsid e424884
Added tests to #3127
whizsid File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
extern crate serde; // 1.0.78 | ||
extern crate serde_json; // 1.0.27 | ||
extern crate serde_derive; // 1.0.78 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
use c; // use c; | ||
use b; // use b; | ||
use a; // use a; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pub use views::*; | ||
pub use foo::bar; // re-export for frontend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// #4027 | ||
pub use views::*; | ||
pub use foo::bar; // re-export for frontend | ||
|
||
// #3720 | ||
use c; // use c; | ||
use b; // use b; | ||
use a; // use a; | ||
|
||
// #3127 | ||
extern crate serde; // 1.0.78 | ||
extern crate serde_json; // 1.0.27 | ||
extern crate serde_derive; // 1.0.78 | ||
|
||
mod c; | ||
mod b; | ||
mod a; | ||
|
||
/*dpre*/ use d; // dpost | ||
/*cpre*/ use c; // cpost | ||
/*bpre*/ use b; // bpost | ||
/*apre*/ use a; // apost | ||
|
||
use std::{}; | ||
use std::borrow::Cow; | ||
|
||
/* comment 1 */ use std::{}; | ||
/* comment 2 */ use std::{}; | ||
/* comment 3 */ use std::{}; | ||
|
||
use std::{}; /* comment 1 */ | ||
use std::{}; /* comment 2 */ | ||
use std::{}; /* comment 3 */ | ||
|
||
/* comment cpre */ use std::{}; /* comment cpost */ | ||
/* comment bpre */ use std::{}; /* comment bpost */ | ||
/* comment dpre */ use std::{}; /* comment dpost */ | ||
|
||
/* comment 1 */ use a; | ||
/* comment 2 */ use b; | ||
/* comment 3 */ use c; | ||
|
||
use std::a; /* comment 1 */ | ||
use std::b; /* comment 2 */ | ||
use std::c; /* comment 3 */ | ||
|
||
/* comment cpre */ use std::c; /* comment cpost */ | ||
/* comment bpre */ use std::b; /* comment bpost */ | ||
/* comment dpre */ use std::a; /* comment dpost */ | ||
|
||
|
||
/* comment 1 */ use std::{}; // Comment 1 | ||
/* comment 2 */ use std::{}; // Comment 2 | ||
/* comment 3 */ use std::{}; // Comment 3 | ||
|
||
|
||
/* Comment | ||
A */ use a; // Comment A | ||
/* Comment B */ use b; // Comment B | ||
/* Comment C */ use c; // Comment C | ||
/* Comment D */ use d; /* Comment | ||
D */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
extern crate serde; // 1.0.78 | ||
extern crate serde_derive; // 1.0.78 | ||
extern crate serde_json; // 1.0.27 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
use a; // use a; | ||
use b; // use b; | ||
use c; // use c; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pub use foo::bar; // re-export for frontend | ||
pub use views::*; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this one was already pretty busy but the extra condition and subsequent indentation is a bit of an eye sore. I guess it'd be okay but I also wouldn't mind seeing some minor refactoring of this existing code too