forked from rust-tw/book-tw
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add rustfmt to the update-rustc script
With a mechanism to ignore particular listings for various reasons
- Loading branch information
1 parent
bc8c9f1
commit dec27ee
Showing
15 changed files
with
49 additions
and
3 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
1 change: 1 addition & 0 deletions
1
...s/ch03-common-programming-concepts/no-listing-19-statements-vs-expressions/rustfmt-ignore
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 @@ | ||
This listing deliberately doesn't parse so rustfmt fails. |
3 changes: 3 additions & 0 deletions
3
listings/ch04-understanding-ownership/listing-04-01/rustfmt-ignore
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 @@ | ||
We have some weird comments pointing out borrowing scopes that we don't want to change; | ||
unfortunately I haven't found a way to skip them with rustfmt that works so for now we're going to | ||
manually skip those listings. See: https://github.com/rust-lang/rustfmt/issues/4028 |
3 changes: 3 additions & 0 deletions
3
listings/ch04-understanding-ownership/listing-04-03/rustfmt-ignore
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 @@ | ||
We have some weird comments pointing out borrowing scopes that we don't want to change; | ||
unfortunately I haven't found a way to skip them with rustfmt that works so for now we're going to | ||
manually skip those listings. See: https://github.com/rust-lang/rustfmt/issues/4028 |
3 changes: 3 additions & 0 deletions
3
listings/ch04-understanding-ownership/listing-04-04/rustfmt-ignore
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 @@ | ||
We have some weird comments pointing out borrowing scopes that we don't want to change; | ||
unfortunately I haven't found a way to skip them with rustfmt that works so for now we're going to | ||
manually skip those listings. See: https://github.com/rust-lang/rustfmt/issues/4028 |
3 changes: 3 additions & 0 deletions
3
listings/ch04-understanding-ownership/no-listing-02-string-scope/rustfmt-ignore
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 @@ | ||
We have some weird comments pointing out borrowing scopes that we don't want to change; | ||
unfortunately I haven't found a way to skip them with rustfmt that works so for now we're going to | ||
manually skip those listings. See: https://github.com/rust-lang/rustfmt/issues/4028 |
3 changes: 3 additions & 0 deletions
3
...ings/ch04-understanding-ownership/no-listing-08-reference-with-annotations/rustfmt-ignore
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 @@ | ||
We have some weird comments pointing out borrowing scopes that we don't want to change; | ||
unfortunately I haven't found a way to skip them with rustfmt that works so for now we're going to | ||
manually skip those listings. See: https://github.com/rust-lang/rustfmt/issues/4028 |
3 changes: 3 additions & 0 deletions
3
...gs/ch04-understanding-ownership/no-listing-15-dangling-reference-annotated/rustfmt-ignore
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 @@ | ||
We have some weird comments pointing out borrowing scopes that we don't want to change; | ||
unfortunately I haven't found a way to skip them with rustfmt that works so for now we're going to | ||
manually skip those listings. See: https://github.com/rust-lang/rustfmt/issues/4028 |
3 changes: 3 additions & 0 deletions
3
listings/ch10-generic-types-traits-and-lifetimes/listing-10-18/rustfmt-ignore
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 @@ | ||
We have some weird comments pointing out borrowing scopes that we don't want to change; | ||
unfortunately I haven't found a way to skip them with rustfmt that works so for now we're going to | ||
manually skip those listings. See: https://github.com/rust-lang/rustfmt/issues/4028 |
3 changes: 3 additions & 0 deletions
3
listings/ch10-generic-types-traits-and-lifetimes/listing-10-19/rustfmt-ignore
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 @@ | ||
We have some weird comments pointing out borrowing scopes that we don't want to change; | ||
unfortunately I haven't found a way to skip them with rustfmt that works so for now we're going to | ||
manually skip those listings. See: https://github.com/rust-lang/rustfmt/issues/4028 |
2 changes: 2 additions & 0 deletions
2
listings/ch14-more-about-cargo/output-only-01-adder-crate/add/rustfmt-ignore
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 @@ | ||
This listing is used for demonstrating how to set up a workspace, but the workspace isn't | ||
completely set up yet, so rustfmt complains the crate mentioned in Cargo.toml doesn't exist yet. |
1 change: 1 addition & 0 deletions
1
listings/ch18-patterns-and-matching/listing-18-25/rustfmt-ignore
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 @@ | ||
This listing deliberately doesn't parse so rustfmt fails. |
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 @@ | ||
max_width = 80 |
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