-
Notifications
You must be signed in to change notification settings - Fork 888
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Version gate raw identifier use statement sorting
When useing `version=One` rustfmt will treat the leading `r#` as part of the `UseSegment` used for sorting. When using `version=Two` rustfmt will ignore the leading `r#` and only consider the name of the identifier when sorting the `UseSegment`.
- Loading branch information
Showing
5 changed files
with
33 additions
and
7 deletions.
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
2 changes: 2 additions & 0 deletions
2
tests/source/imports_raw_identifiers.rs → ...ce/imports_raw_identifiers/version_One.rs
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
// rustfmt-version:One | ||
|
||
use websocket::client::ClientBuilder; | ||
use websocket::r#async::futures::Stream; | ||
use websocket::result::WebSocketError; |
4 changes: 3 additions & 1 deletion
4
tests/target/imports_raw_identifiers.rs → ...ce/imports_raw_identifiers/version_Two.rs
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
use websocket::r#async::futures::Stream; | ||
// rustfmt-version:Two | ||
|
||
use websocket::client::ClientBuilder; | ||
use websocket::r#async::futures::Stream; | ||
use websocket::result::WebSocketError; |
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,5 @@ | ||
// rustfmt-version:One | ||
|
||
use websocket::client::ClientBuilder; | ||
use websocket::r#async::futures::Stream; | ||
use websocket::result::WebSocketError; |
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,5 @@ | ||
// rustfmt-version:Two | ||
|
||
use websocket::r#async::futures::Stream; | ||
use websocket::client::ClientBuilder; | ||
use websocket::result::WebSocketError; |