Skip to content

Commit dec27ee

Browse files
committed
Add rustfmt to the update-rustc script
With a mechanism to ignore particular listings for various reasons
1 parent bc8c9f1 commit dec27ee

File tree

15 files changed

+49
-3
lines changed

15 files changed

+49
-3
lines changed

ADMIN_TASKS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ listing beyond the most trivial should be extracted into a file. To do that:
6868
of user input or external events like making a web request), keep the output inline but make a
6969
comment that contains `manual-regeneration` and instructions for manually updating the inline
7070
output.
71+
- If you don't want this example to even be attempted to be formatted by `rustfmt` (for example
72+
because the example doesn't parse on purpose), add a `rustfmt-ignore` file in the listing's
73+
directory and the reason it's not being formatted as the contents of that file (in case it's a
74+
rustfmt bug that might get fixed someday).
7175

7276
## See the effect of some change on the rendered book
7377

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This listing deliberately doesn't parse so rustfmt fails.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
We have some weird comments pointing out borrowing scopes that we don't want to change;
2+
unfortunately I haven't found a way to skip them with rustfmt that works so for now we're going to
3+
manually skip those listings. See: https://github.com/rust-lang/rustfmt/issues/4028
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
We have some weird comments pointing out borrowing scopes that we don't want to change;
2+
unfortunately I haven't found a way to skip them with rustfmt that works so for now we're going to
3+
manually skip those listings. See: https://github.com/rust-lang/rustfmt/issues/4028
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
We have some weird comments pointing out borrowing scopes that we don't want to change;
2+
unfortunately I haven't found a way to skip them with rustfmt that works so for now we're going to
3+
manually skip those listings. See: https://github.com/rust-lang/rustfmt/issues/4028
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
We have some weird comments pointing out borrowing scopes that we don't want to change;
2+
unfortunately I haven't found a way to skip them with rustfmt that works so for now we're going to
3+
manually skip those listings. See: https://github.com/rust-lang/rustfmt/issues/4028
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
We have some weird comments pointing out borrowing scopes that we don't want to change;
2+
unfortunately I haven't found a way to skip them with rustfmt that works so for now we're going to
3+
manually skip those listings. See: https://github.com/rust-lang/rustfmt/issues/4028
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
We have some weird comments pointing out borrowing scopes that we don't want to change;
2+
unfortunately I haven't found a way to skip them with rustfmt that works so for now we're going to
3+
manually skip those listings. See: https://github.com/rust-lang/rustfmt/issues/4028
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
We have some weird comments pointing out borrowing scopes that we don't want to change;
2+
unfortunately I haven't found a way to skip them with rustfmt that works so for now we're going to
3+
manually skip those listings. See: https://github.com/rust-lang/rustfmt/issues/4028
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
We have some weird comments pointing out borrowing scopes that we don't want to change;
2+
unfortunately I haven't found a way to skip them with rustfmt that works so for now we're going to
3+
manually skip those listings. See: https://github.com/rust-lang/rustfmt/issues/4028

0 commit comments

Comments
 (0)