-
Notifications
You must be signed in to change notification settings - Fork 926
Fix Issue 6470: Preserve Space after colon if followed by absolute path declaration (::) #6475
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
Open
FwP-IDN
wants to merge
20
commits into
rust-lang:master
Choose a base branch
from
FwP-IDN:issue-6470-dont-delete-white-space-on-triple-colon
base: master
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 7 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
9255320
add change, and testcase
FwP-IDN 6befafc
add change, and testcase
FwP-IDN 2c8d6bd
make function to check absolute path declaration and fix logic error …
FwP-IDN ab9ca11
Merge branch 'master' into issue-6470-dont-delete-white-space-on-trip…
FwP-IDN e8ec19f
add more testcase and fix linter in code
FwP-IDN cb0c596
add more testcase
FwP-IDN 32284e0
add more testcase
FwP-IDN 51f0032
Merge branch 'master' into issue-6470-dont-delete-white-space-on-trip…
FwP-IDN 62230c1
add more testcase
FwP-IDN 3b53578
add more testcase
FwP-IDN 471dcc5
undo reformat
FwP-IDN d5fb3ae
undo reformat
FwP-IDN a05422a
undo reformat
FwP-IDN 318a51f
add testcase
FwP-IDN 5b93020
add testcase
FwP-IDN d87b0b2
fix test error
FwP-IDN 20c6e60
fix test error
FwP-IDN 6b3cdb3
restrict publicity
FwP-IDN 2ce99b0
Merge branch 'master' into issue-6470-dont-delete-white-space-on-trip…
FwP-IDN 518ae6a
Merge branch 'master' into issue-6470-dont-delete-white-space-on-trip…
FwP-IDN 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
FwP-IDN marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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,44 @@ | ||
// rustfmt-space_after_colon: false | ||
|
||
struct SomeStruct { | ||
field1: ::some_crate::Thing, | ||
field2 : ::some_crate::Thing, | ||
|
||
field3:some_crate::Thing, | ||
field4 :some_crate::Thing, | ||
field5: some_crate::Thing, | ||
field6 : some_crate::Thing, | ||
|
||
field7:i32, | ||
field8 :i32, | ||
field9: i32, | ||
field10 : i32, | ||
} | ||
|
||
const THING1: ::some_crate::SomeType = ::some_crate::SomeType::default(); | ||
FwP-IDN marked this conversation as resolved.
Show resolved
Hide resolved
|
||
const THING2 : ::some_crate::SomeType = ::some_crate::SomeType::default(); | ||
|
||
const THING3: some_crate::SomeType = some_crate::SomeType::default(); | ||
const THING4 :some_crate::SomeType = some_crate::SomeType::default(); | ||
const THING5: some_crate::SomeType = some_crate::SomeType::default(); | ||
const THING6 : some_crate::SomeType = some_crate::SomeType::default(); | ||
|
||
const THING7: i32 = 0; | ||
const THING8 :i32 = 0; | ||
const THING9: i32 = 0; | ||
const THING10 : i32 = 0; | ||
|
||
fn main() { | ||
let x1: ::some_crate::SomeType = ::some_crate::SomeType::default(); | ||
let x2 : ::some_crate::SomeType = ::some_crate::SomeType::default(); | ||
|
||
let x3:some_crate::SomeType = ::some_crate::SomeType::default(); | ||
let x4 : some_crate::SomeType = ::some_crate::SomeType::default(); | ||
let x5: some_crate::SomeType = ::some_crate::SomeType::default(); | ||
let x6 : some_crate::SomeType = ::some_crate::SomeType::default(); | ||
|
||
let x7: i32 = 0; | ||
let x8 :i32 = 0; | ||
let x9: i32 = 0; | ||
let x10 : i32 = 0; | ||
} |
This file contains hidden or 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,44 @@ | ||
// rustfmt-space_after_colon: true | ||
|
||
struct SomeStruct { | ||
field1: ::some_crate::Thing, | ||
field2 : ::some_crate::Thing, | ||
|
||
field3:some_crate::Thing, | ||
field4 :some_crate::Thing, | ||
field5: some_crate::Thing, | ||
field6 : some_crate::Thing, | ||
|
||
field7:i32, | ||
field8 :i32, | ||
field9: i32, | ||
field10 : i32, | ||
} | ||
|
||
const THING1: ::some_crate::SomeType = ::some_crate::SomeType::default(); | ||
const THING2 : ::some_crate::SomeType = ::some_crate::SomeType::default(); | ||
|
||
const THING3: some_crate::SomeType = some_crate::SomeType::default(); | ||
const THING4 :some_crate::SomeType = some_crate::SomeType::default(); | ||
const THING5: some_crate::SomeType = some_crate::SomeType::default(); | ||
const THING6 : some_crate::SomeType = some_crate::SomeType::default(); | ||
|
||
const THING7: i32 = 0; | ||
const THING8 :i32 = 0; | ||
const THING9: i32 = 0; | ||
const THING10 : i32 = 0; | ||
|
||
fn main() { | ||
let x1: ::some_crate::SomeType = ::some_crate::SomeType::default(); | ||
let x2 : ::some_crate::SomeType = ::some_crate::SomeType::default(); | ||
|
||
let x3:some_crate::SomeType = ::some_crate::SomeType::default(); | ||
let x4 : some_crate::SomeType = ::some_crate::SomeType::default(); | ||
let x5: some_crate::SomeType = ::some_crate::SomeType::default(); | ||
let x6 : some_crate::SomeType = ::some_crate::SomeType::default(); | ||
|
||
let x7: i32 = 0; | ||
let x8 :i32 = 0; | ||
let x9: i32 = 0; | ||
let x10 : i32 = 0; | ||
} |
This file contains hidden or 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,44 @@ | ||
// rustfmt-space_after_colon: false | ||
|
||
struct SomeStruct { | ||
field1: ::some_crate::Thing, | ||
field2: ::some_crate::Thing, | ||
|
||
field3:some_crate::Thing, | ||
field4:some_crate::Thing, | ||
field5:some_crate::Thing, | ||
field6:some_crate::Thing, | ||
|
||
field7:i32, | ||
field8:i32, | ||
field9:i32, | ||
field10:i32, | ||
} | ||
|
||
const THING1: ::some_crate::SomeType = ::some_crate::SomeType::default(); | ||
const THING2: ::some_crate::SomeType = ::some_crate::SomeType::default(); | ||
|
||
const THING3:some_crate::SomeType = some_crate::SomeType::default(); | ||
const THING4:some_crate::SomeType = some_crate::SomeType::default(); | ||
const THING5:some_crate::SomeType = some_crate::SomeType::default(); | ||
const THING6:some_crate::SomeType = some_crate::SomeType::default(); | ||
|
||
const THING7:i32 = 0; | ||
const THING8:i32 = 0; | ||
const THING9:i32 = 0; | ||
const THING10:i32 = 0; | ||
|
||
fn main() { | ||
let x1: ::some_crate::SomeType = ::some_crate::SomeType::default(); | ||
let x2: ::some_crate::SomeType = ::some_crate::SomeType::default(); | ||
|
||
let x3:some_crate::SomeType = ::some_crate::SomeType::default(); | ||
let x4:some_crate::SomeType = ::some_crate::SomeType::default(); | ||
let x5:some_crate::SomeType = ::some_crate::SomeType::default(); | ||
let x6:some_crate::SomeType = ::some_crate::SomeType::default(); | ||
|
||
let x7:i32 = 0; | ||
let x8:i32 = 0; | ||
let x9:i32 = 0; | ||
let x10:i32 = 0; | ||
} |
This file contains hidden or 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,44 @@ | ||
// rustfmt-space_after_colon: true | ||
|
||
struct SomeStruct { | ||
field1: ::some_crate::Thing, | ||
field2: ::some_crate::Thing, | ||
|
||
field3: some_crate::Thing, | ||
field4: some_crate::Thing, | ||
field5: some_crate::Thing, | ||
field6: some_crate::Thing, | ||
|
||
field7: i32, | ||
field8: i32, | ||
field9: i32, | ||
field10: i32, | ||
} | ||
|
||
const THING1: ::some_crate::SomeType = ::some_crate::SomeType::default(); | ||
const THING2: ::some_crate::SomeType = ::some_crate::SomeType::default(); | ||
|
||
const THING3: some_crate::SomeType = some_crate::SomeType::default(); | ||
const THING4: some_crate::SomeType = some_crate::SomeType::default(); | ||
const THING5: some_crate::SomeType = some_crate::SomeType::default(); | ||
const THING6: some_crate::SomeType = some_crate::SomeType::default(); | ||
|
||
const THING7: i32 = 0; | ||
const THING8: i32 = 0; | ||
const THING9: i32 = 0; | ||
const THING10: i32 = 0; | ||
|
||
fn main() { | ||
let x1: ::some_crate::SomeType = ::some_crate::SomeType::default(); | ||
let x2: ::some_crate::SomeType = ::some_crate::SomeType::default(); | ||
|
||
let x3: some_crate::SomeType = ::some_crate::SomeType::default(); | ||
let x4: some_crate::SomeType = ::some_crate::SomeType::default(); | ||
let x5: some_crate::SomeType = ::some_crate::SomeType::default(); | ||
let x6: some_crate::SomeType = ::some_crate::SomeType::default(); | ||
|
||
let x7: i32 = 0; | ||
let x8: i32 = 0; | ||
let x9: i32 = 0; | ||
let x10: i32 = 0; | ||
} |
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.
Can you explain why we can pass
false
here? It would also be helpful if you could add an explanation to the other call sites where you've passedfalse
.