Skip to content
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

[WIP] Rust 2024 #68

Open
wants to merge 650 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
650 commits
Select commit Hold shift + click to select a range
fa655f2
Fix unfancy quotes
carols10cents Aug 13, 2024
75bc555
Updates to ch7 snapshot, not to send to nostarch
carols10cents Aug 13, 2024
48a3c17
Upstream changes to ch7 to consider sending to nostarch
carols10cents Aug 13, 2024
8880eac
Backported edits of ch12 from print to src
carols10cents Aug 13, 2024
bffbeb1
Reword to avoid a/an where pronunciation is unclear
carols10cents Aug 13, 2024
d189d7b
Make all search word arguments italics
carols10cents Aug 13, 2024
b988be3
Instead of special casing square brackets in code, don't support md l…
carols10cents Aug 14, 2024
084b0e3
Snapshot changes to generated ch12 that SHOULDN'T be sent to nostarch
carols10cents Aug 14, 2024
e7d217b
Snapshot changes to ch 12 to consider sending to nostarch
carols10cents Aug 14, 2024
fb718b3
Merge `main` into `async-edits`
chriskrycho Jul 31, 2024
ddad349
Merge `async-edits` into `only-new-async`
chriskrycho Aug 5, 2024
a42f27b
Ch. 17: Fix up diagrams
chriskrycho Aug 24, 2024
f812ed0
Ch. 17§00: second round of edits
chriskrycho Aug 24, 2024
c648c0e
Use immutable borrow of `TcpStream` when creating `BufReader`
bin-wang Aug 30, 2024
ef4a518
cargo init usage suggestion
ficcialfaint Aug 31, 2024
1de14c8
Ch. 17: start restructuring chapter
chriskrycho Aug 24, 2024
6b6b450
Upgrade to Rust 1.81
chriskrycho Sep 10, 2024
589ce6b
Merge pull request #4031 from rust-lang/rust-1.81
chriskrycho Sep 11, 2024
299fd1f
Clarify Cargo.toml generation with `cargo init`.
chriskrycho Sep 11, 2024
28a2444
Merge pull request #4024 from bin-wang/remove-mut
chriskrycho Sep 11, 2024
e2b7246
Merge pull request #4025 from ficcialfaint/cargo-init
chriskrycho Sep 11, 2024
d5932d2
Update build instructions: include mdbook plugins
chriskrycho Sep 11, 2024
2b07207
Merge pull request #4032 from rust-lang/updated-build-instructions
chriskrycho Sep 12, 2024
c552952
Ch. 17: rename `trpl::block_on` to `trpl::run`
chriskrycho Aug 24, 2024
cd12a1e
Ch. 17: more edits for first three sections
chriskrycho Sep 10, 2024
487c81d
Merge `main` into `async-edits` (Rust 1.81 update)
chriskrycho Sep 11, 2024
9b13b95
Upgrade Ch. 17 listings for Rust 1.81
chriskrycho Sep 10, 2024
3cfdf2d
Ch. 17: rework 17.03 (and overall structure) from my own analysis
chriskrycho Sep 10, 2024
97902d5
Ch. 17: rework 17.04 with my own edits and analysis
chriskrycho Sep 11, 2024
68049c6
Ch. 17: rework 17.05 with my own edits and analysis
chriskrycho Sep 11, 2024
0d8da8b
Ch. 17: fold together 17.03 and 17.04
chriskrycho Sep 11, 2024
7da825f
Ch. 17: Make the new 17.05 actually work as a deep dive!
chriskrycho Sep 11, 2024
6bdf1b7
Merge `main` into `async-edits`
chriskrycho Sep 12, 2024
1d3517c
Ch. 17: integrate a number of the outstanding review comments
chriskrycho Sep 11, 2024
c4d02bf
Ch. 17: address the rest of James’ review comments 🎉
chriskrycho Sep 12, 2024
c35b7d9
Ch. 17: address most of the rest of Carol's outstanding comments
chriskrycho Sep 12, 2024
453247c
Ch. 17: address Tim and Carol's outstanding comments
chriskrycho Sep 13, 2024
ccafd06
Ch. 17: Fix some typos!
chriskrycho Sep 13, 2024
6f5773e
Remove duplicate integration test from root
chriskrycho Sep 16, 2024
33d5efb
translations: remove broken link
cirolosapio Sep 20, 2024
cc5db97
Ch. 17: rewrite 17.01 with a better example
chriskrycho Sep 13, 2024
573a6ca
Ch. 17: fix mdbook test output
chriskrycho Sep 20, 2024
b265249
Ch. 17: Fix spelling and internal links
chriskrycho Sep 23, 2024
25ca8a1
Merge `async-edits` into `only-new-async`
chriskrycho Sep 23, 2024
99cf75a
Merge pull request #4036 from cirolosapio/patch-1
chriskrycho Sep 23, 2024
dd80496
Fixed Ukrainian translation link to community repo
pavloslav Sep 24, 2024
42b5963
Ch. 17: General cleanup and edits to esp. 17.05
chriskrycho Sep 23, 2024
beac73a
Ch. 17: introduce diagrams for `Pin` and `Unpin`.
chriskrycho Sep 23, 2024
0388426
Ch. 17: Fix no-listing code for state machine enum
chriskrycho Sep 25, 2024
75ec154
infra: publish trpl@0.2.0 w/new features from edits
chriskrycho Sep 25, 2024
694ba69
Merge pull request #4039 from pavloslav/main
chriskrycho Sep 25, 2024
0a31355
Convert ch04 to `<Listing>`
jpmelos Sep 26, 2024
df49c42
The ones without listing numbers
jpmelos Sep 26, 2024
d7c8e04
The ones without number, caption, and file name
jpmelos Sep 26, 2024
7f2d814
Merge `main` into `async-chapter`
chriskrycho Sep 27, 2024
72ef94c
Revert "The ones without number, caption, and file name"
jpmelos Sep 28, 2024
88c3e55
Mention move of individual struct fields
jpmelos Sep 29, 2024
019a8d7
Consider mentioning the syntax to destructure a tuple struct
jpmelos Sep 29, 2024
09239f3
Merge pull request #4043 from jpmelos/convert-ch04-listings
chriskrycho Sep 30, 2024
dc67ffe
Add a short discussion of assignment and ownership in ch. 04
chriskrycho Sep 30, 2024
81c42b5
Simplify dot file for Figure 4-5
chriskrycho Oct 1, 2024
aca71b6
Ch. 17: correct a missing word
chriskrycho Oct 1, 2024
8df8d8e
Be more explicit about creating a new project
carols10cents Oct 1, 2024
e8e0c6b
Introduce the listing more explicitly
carols10cents Oct 1, 2024
f727627
There is no name argument, but there is a url parameter
carols10cents Oct 1, 2024
a37e1a7
Rust not allowing main to be async isn't due to the first part of the…
carols10cents Oct 1, 2024
2f8e266
Clarify which reason we're talking about and what Rust programs have …
carols10cents Oct 1, 2024
e4e5a4b
We haven't added 2 calls yet; remove some text that's jumping ahead
carols10cents Oct 1, 2024
9fca5aa
Add a bit more detail about why we'd want a state machine enum
carols10cents Oct 1, 2024
01f089a
Clarify writing what would be tedious, and what changes later would b…
carols10cents Oct 1, 2024
502adbf
Be clearer about where we're using trpl::run and what it's running
carols10cents Oct 1, 2024
9ad373f
Correct function name and pronoun number
carols10cents Oct 1, 2024
a25f576
This sounds like 1 call with 2 URLs but it's 2 calls with 1 URL each
carols10cents Oct 1, 2024
15f353c
Add a trailing comma on the last variant
carols10cents Oct 1, 2024
d34446d
Correct another instance of an old function name
carols10cents Oct 1, 2024
f713c79
Put back the invitation to race URLs at the end
carols10cents Oct 1, 2024
78679a7
Clarify why the block only borrows and remove an unneeded word
carols10cents Oct 1, 2024
f01527c
Since -> because because none of these are time-based
carols10cents Oct 1, 2024
c2c083c
Removing code style around futures; not sure what this refers to
carols10cents Oct 1, 2024
63e7ab1
Oh I see, it's the futures variable, but then I wouldn't call it a tr…
carols10cents Oct 1, 2024
b82de7e
Revert "Mention move of individual struct fields"
jpmelos Oct 1, 2024
26bea11
Add note about field access after struct update syntax
jpmelos Oct 1, 2024
204f0fc
Don't run tests for this snippet
jpmelos Oct 1, 2024
2d28663
Convert ch05 to `<Listing>`
jpmelos Oct 1, 2024
db93cd0
Caveat specificity of recv earlier, so we don't get WELL ACTUALLY pol…
carols10cents Oct 1, 2024
a97d72a
Change future tense to past tense or whatever these tenses are
carols10cents Oct 1, 2024
048717a
Missing period
carols10cents Oct 1, 2024
b3aef45
Stream is a trait
carols10cents Oct 1, 2024
428d6de
like -> similar to
carols10cents Oct 1, 2024
6cd340c
'All we need to do' makes it sound easy, but it might not be
carols10cents Oct 1, 2024
cec24f5
Be more specific than things
carols10cents Oct 1, 2024
79c2110
Say more about why we're building a stream instead of WebSockets
carols10cents Oct 1, 2024
9070b7f
Add an explicit definition of poll so we can use it later
carols10cents Oct 1, 2024
7aa0f88
Add a quick explanation of the semantics of merge
carols10cents Oct 1, 2024
ff5f487
Remove an extra 'with'
carols10cents Oct 1, 2024
796e534
Correct subj/verb agreement and remove a 'simply'
carols10cents Oct 1, 2024
48379d3
Update code and output to match text
carols10cents Oct 1, 2024
4647c8b
Add trailing comma
carols10cents Oct 2, 2024
801988c
Merge pull request #4051 from jpmelos/convert-ch05-to-listing
chriskrycho Oct 2, 2024
08dc0d2
Merge pull request #4046 from jpmelos/small-improvements-to-ch05
chriskrycho Oct 2, 2024
afe43ca
Use contractions more; a few tiny fixes
carols10cents Oct 2, 2024
84eab32
Be more specific about 'them'
carols10cents Oct 3, 2024
13e7c88
Clarify where the commonly used Stream definition comes from
carols10cents Oct 3, 2024
9572827
Minimize the word 'like' when other words would fit
carols10cents Oct 3, 2024
fa97cab
Change nostarch snapshot chapter numbers to make room for the async c…
carols10cents Oct 4, 2024
3b8d132
Generated nostarch snapshot for the new async chapter
carols10cents Oct 4, 2024
daccf5e
Manual changes to the async chapter snapshot
carols10cents Oct 4, 2024
6b3fb81
A bit more clarity about all the stack types in 3.2
chriskrycho Oct 4, 2024
f26aa3d
Merge pull request #4055 from rust-lang/stack-types-clarity
chriskrycho Oct 4, 2024
a50711a
Correct the explanation of what `::<path>` means
chriskrycho Oct 4, 2024
52fa1c9
Standardize on 'adapter', not 'adaptor'
chriskrycho Oct 4, 2024
691f0e4
Merge pull request #4057 from rust-lang/adapter-not-adaptor-3824
chriskrycho Oct 4, 2024
33cc45c
Merge pull request #4049 from rust-lang/fix-4001-correctly
chriskrycho Oct 4, 2024
1182dc1
Merge branch 'main' into small-improvements-to-ch05-2
jpmelos Oct 5, 2024
65c0eaa
Just mention that when destructuring, need to mention type name
jpmelos Oct 5, 2024
2017a78
Swap assert_eq! parameters
damoasda Oct 6, 2024
f38ce8b
Merge pull request #4058 from damoasda/ch11-02-fix
chriskrycho Oct 7, 2024
db949d6
Ch. 17: Remove TODO about `Stream` stabilization
chriskrycho Oct 7, 2024
80158e1
Inline example of destructuring a tuple struct.
chriskrycho Oct 7, 2024
c1d60d0
Ch. 17: some alternative wordings for “like” substitutions
chriskrycho Oct 7, 2024
06a3a71
Merge `main` into `async-chapter`
chriskrycho Oct 7, 2024
8f63245
Ch. 17: fix task names in Figure 17-2
chriskrycho Oct 7, 2024
3111eda
Ch. 17: create a diagram showing blocked parallelism
chriskrycho Oct 7, 2024
a64884f
Ch. 17: kill a double-“thus”
chriskrycho Oct 7, 2024
8aee93d
Ch. 17: include `main` when first showing `trpl::run`
chriskrycho Oct 7, 2024
3401154
Merge pull request #4047 from jpmelos/small-improvements-to-ch05-2
chriskrycho Oct 7, 2024
f45980a
Ch. 17: get rid of some extra italics
chriskrycho Oct 7, 2024
7076be0
Ch. 17: improve the discussion of streams
chriskrycho Oct 8, 2024
3b920cd
Ch. 17: tweaks and fixes for discussion of the traits
chriskrycho Oct 8, 2024
1af831a
Ch. 17: Fix a lot of wording issues in the conclusion section
chriskrycho Oct 8, 2024
887694b
Ch. 17: update all the listing lock files
chriskrycho Oct 8, 2024
fb0215d
Ch. 17: Listings for Ch. 20 -> Ch. 21
chriskrycho Sep 26, 2024
82f91e7
Ch. 17: Listings for Ch. 19 -> Ch. 20
chriskrycho Sep 26, 2024
1f6ce67
Ch. 17: Listings for Ch. 18 -> Ch. 19
chriskrycho Sep 26, 2024
c8f4464
Ch. 17: Listings for old Ch. 17 -> Ch. 18
chriskrycho Sep 26, 2024
1fb74c3
Ch. 17: update all other text references for new ordering
chriskrycho Sep 26, 2024
54c567b
Ch. 17: update all internal links for new ordering
chriskrycho Sep 26, 2024
809b24a
Fix another listing number
chriskrycho Oct 3, 2024
fc62e40
Fix one more listing number
chriskrycho Oct 8, 2024
859c4e0
Merge pull request #4042 from rust-lang/async-chapter-with-listings
chriskrycho Oct 8, 2024
68b4d35
Merge pull request #4037 from rust-lang/async-chapter
chriskrycho Oct 9, 2024
3e44592
Adopt <Listing> for Ch. 18
chriskrycho Oct 9, 2024
7335c65
Adopt <Listing> for Ch. 19
chriskrycho Oct 9, 2024
bfcebbb
Adopt <Listing> for Ch. 20
chriskrycho Oct 9, 2024
7ce0849
Adopt <Listing> for Ch. 21
chriskrycho Oct 9, 2024
9e79bd0
Merge pull request #4060 from rust-lang/listing-for-final-chs
chriskrycho Oct 9, 2024
1324c75
Add HTML-based redirects for previous chapter numbering
chriskrycho Oct 9, 2024
d7b5eb9
Merge pull request #4061 from rust-lang/html-based-redirects
chriskrycho Oct 9, 2024
0bee1e6
Remove "different" repetition typo in chapter 17.1
devgiants Oct 10, 2024
e95efa0
Re-wrap lines after fixing extra word
chriskrycho Oct 10, 2024
57f4196
Merge pull request #4063 from devgiants/overflaw-fix-repetition-typo
chriskrycho Oct 10, 2024
a514770
Add info about handling editions in book.toml to ADMIN.md
chriskrycho Oct 10, 2024
f156c59
Merge pull request #4064 from rust-lang/book-toml-editions-info
chriskrycho Oct 10, 2024
27f2d71
Add Chris Krycho as an author.
chriskrycho Oct 10, 2024
2bb3691
Merge pull request #4056 from rust-lang/appendix-path-qualifiers-3841
chriskrycho Oct 10, 2024
2399b90
Merge pull request #4065 from rust-lang/author-chris-krycho
chriskrycho Oct 10, 2024
fd14508
Revert "Chapter 6 - Wrap all `<Listing>`s to comply with the virtual …
chriskrycho Oct 11, 2024
577a70b
Adopt <Listing> for Ch. 16
LifeAdventurer Oct 11, 2024
b28a2f6
Merge pull request #3977 from SpectralPixel/listing-preprocessor-chap…
chriskrycho Oct 15, 2024
1d595d8
Fix up `<Listing>` usage in Ch. 18
chriskrycho Oct 15, 2024
6f299e7
Merge pull request #4069 from rust-lang/ch18-listing-fixup
chriskrycho Oct 15, 2024
3e8adfb
Merge pull request #4066 from LifeAdventurer/main
chriskrycho Oct 15, 2024
8aab8a2
Back out "Chapter 8 - Wrap all `<Listing>`s to comply with the virtua…
chriskrycho Oct 15, 2024
d5a89d9
Back out "Chapter 7 - Wrap all `<Listing>`s to comply with the virtua…
chriskrycho Oct 15, 2024
8b443bc
Back out "Chapter 10 - Wrap all `<Listing>`s to comply with the virtu…
chriskrycho Oct 15, 2024
c589649
Back out "Chapter 9 - Wrap all `<Listing>`s to comply with the virtua…
chriskrycho Oct 15, 2024
991e64c
Merge pull request #3978 from SpectralPixel/listing-preprocessor-chap…
chriskrycho Oct 15, 2024
1bfea4f
Merge pull request #3981 from SpectralPixel/listing-preprocessor-chap…
chriskrycho Oct 15, 2024
e03be68
Merge pull request #3979 from SpectralPixel/listing-preprocessor-chap…
chriskrycho Oct 15, 2024
9e85fcc
Ch. 17: integrate early reader feedback
chriskrycho Oct 15, 2024
a328c6e
infra: improve error handling for `Listing`
chriskrycho Oct 15, 2024
3b96a4b
Ch. 18: fix bad attribute on a `<Listing>`
chriskrycho Oct 15, 2024
5749ade
Merge pull request #4071 from rust-lang/listing-attr-handling
chriskrycho Oct 15, 2024
ec6b1b4
Merge pull request #4070 from rust-lang/ch17-reader-feedback
chriskrycho Oct 15, 2024
206bb69
Merge pull request #3980 from SpectralPixel/listing-preprocessor-chap…
chriskrycho Oct 15, 2024
d8a10b8
Use `<Listing>` for Chapter 15
chriskrycho Oct 15, 2024
d9202d8
Merge pull request #4072 from rust-lang/ch15-listing-work
chriskrycho Oct 15, 2024
1a9f1eb
Ch. 17: Correct several points about `Pin` and `Unpin`
chriskrycho Oct 15, 2024
1cbfc5c
Merge pull request #4073 from rust-lang/ch17-pin-corrections
chriskrycho Oct 15, 2024
62d4410
Ch. 19: discuss `while let` referencing ch. 17
chriskrycho Oct 16, 2024
9b812c6
Merge pull request #4075 from rust-lang/ch19-for-ch17
chriskrycho Oct 17, 2024
1c6c445
add missing semicolon in listing 19-15
jasonodonnell Oct 24, 2024
b1f6e06
add semicolon to 19-16
jasonodonnell Oct 24, 2024
be84fe8
infra: change how packages are opted out of workspaces
chriskrycho Oct 25, 2024
7f1f98e
Merge pull request #4083 from rust-lang/fix-workspace-config
chriskrycho Oct 25, 2024
aa5427d
Merge pull request #4079 from jasonodonnell/main
chriskrycho Oct 26, 2024
55a2693
infra: switch to `rustls` in `reqwest` dep for `trpl`
chriskrycho Oct 28, 2024
f04c685
Merge pull request #4085 from rust-lang/rustls-for-trpl-reqwest
chriskrycho Oct 29, 2024
5b80fa3
Bump quinn-proto from 0.11.6 to 0.11.8 in /packages/trpl
dependabot[bot] Oct 29, 2024
0b8b81e
Merge pull request #4086 from rust-lang/dependabot/cargo/packages/trp…
chriskrycho Oct 30, 2024
7c75ed3
Ch. 17 fixes: correct a bad link in the 2018 edition pages
chriskrycho Oct 30, 2024
4b65ace
Merge pull request #4087 from rust-lang/fix-bad-link
chriskrycho Oct 30, 2024
5f04987
Ch. 21: Update to mention async/await as appropriate
chriskrycho Sep 27, 2024
44b246e
Merge pull request #4088 from rust-lang/final-project-tweaks
chriskrycho Oct 31, 2024
f612444
ch17-01: Fix typos
jpmelos Nov 3, 2024
3acd276
Fix a typo
jpmelos Nov 3, 2024
850ddec
Add what seems to be a missing link
jpmelos Nov 3, 2024
4072934
Add links to be after the last paragraph
jpmelos Nov 3, 2024
be7d802
Revert comma deletion
chriskrycho Nov 4, 2024
a5379a3
Merge pull request #4092 from jpmelos/jpmelos-ch17-01-fix-typo
chriskrycho Nov 4, 2024
c57c34b
Merge pull request #4093 from jpmelos/jpmelos-ch17-05-fix-typos
chriskrycho Nov 4, 2024
b9241f6
infra: support listing deps in `update-rustc.sh`
chriskrycho Nov 4, 2024
a92d8e6
Update Cargo.lock for all Ch. 17 listings
chriskrycho Nov 4, 2024
e28cd5b
Set the correct baseline for current Rust version
chriskrycho Nov 4, 2024
effecb8
infra: rewrite rustup toolchain paths in update-rustc.sh
chriskrycho Nov 5, 2024
c913659
infra: correctly report skipped paths in listings
chriskrycho Nov 5, 2024
9650137
Update to Rust 1.82
chriskrycho Oct 17, 2024
f4b2254
Merge pull request #4089 from rust-lang/rust-1.82
chriskrycho Nov 5, 2024
f04d20f
Rust 1.82: also update all cases of manual regeneration
chriskrycho Nov 5, 2024
91381a1
Add new terms to dictionary
chriskrycho Nov 6, 2024
7ee012f
infra: *some* file paths can also contain `file:///home`
chriskrycho Nov 6, 2024
978e994
Merge pull request #4096 from rust-lang/rust-1.82-manual-regen
chriskrycho Nov 6, 2024
2b1ddf4
Use new `&raw` feature for sound raw pointer usage.
chriskrycho Oct 3, 2024
48d0b76
Ch. 20: Fix safety handling in the `static mut` example
chriskrycho Oct 3, 2024
3fdb520
Introduce basic usage of Miri in the unsafe chapter
chriskrycho Oct 3, 2024
e934f31
Ch. 20: correct text about how we got raw pointers
chriskrycho Oct 16, 2024
3e725cd
Add 'Miri' and 'miri' to the dictionary
chriskrycho Nov 6, 2024
af61f95
Fix output paths for updates in Ch. 20
chriskrycho Nov 6, 2024
777a5ba
Merge pull request #4062 from rust-lang/unsafe-fixes
chriskrycho Nov 6, 2024
da61167
Correct baseline after running update-rustc.sh again
chriskrycho Nov 6, 2024
e16dd73
Merge pull request #4097 from rust-lang/new-baseline
chriskrycho Nov 6, 2024
77b52a8
Ch17-05: Typos
jpmelos Nov 10, 2024
a9c38c2
Drop the comma change
jpmelos Nov 12, 2024
c7e7f8f
Ch20-01: Fix typos
jpmelos Nov 18, 2024
93d741a
Rust 2024: update Ch. 20 for new `unsafe` rules
chriskrycho Oct 17, 2024
a26b76f
Merge pull request #4111 from rust-lang/2024-edition
chriskrycho Nov 26, 2024
c4afacc
Add a short paragraph on editors and IDEs in installation
chriskrycho Nov 26, 2024
ff6c42e
Merge pull request #4112 from rust-lang/push-swvvkxkulxqy
chriskrycho Nov 26, 2024
6cee3d6
Merge pull request #4105 from jpmelos/jpmelos-ch20-01-fix-typos
chriskrycho Nov 26, 2024
dffa6a9
Merge pull request #4099 from jpmelos/jpmelos-ch17-05-typos
chriskrycho Nov 26, 2024
398eb06
Very small clarification on if let
chriskrycho Nov 26, 2024
fb3b8fc
Merge pull request #4113 from rust-lang/push-lplqmmmnzrnr
chriskrycho Nov 26, 2024
d119e94
Drop a pedantry-triggering sentence about IEEE-754
chriskrycho Nov 27, 2024
34afc7a
Merge pull request #4114 from rust-lang/push-qkxwxlrxmtul
chriskrycho Nov 27, 2024
3afd582
Refer to `--exact` for running exact one test
ledusledus Jul 19, 2023
871ace8
Link to the rustc book for docs about `cargo test -- <this stuff>`
chriskrycho Nov 27, 2024
66db452
Merge pull request #4116 from rust-lang/chriskrycho/mention-rustc-book
chriskrycho Nov 27, 2024
52b9e2a
Match NoStarch style guide for updated Listing 4-3 comment
chriskrycho Nov 27, 2024
fb46a07
Merge pull request #3809 from octavioooooo/patch-1
chriskrycho Nov 27, 2024
294b80d
Ch. 17: fix some wording issues
chriskrycho Nov 27, 2024
ef5b909
Merge pull request #4117 from rust-lang/push-mnoxkxzvzqpv
chriskrycho Nov 27, 2024
daf8d82
Fix confusion between variable `hello` and string `"hello"`
chriskrycho Nov 27, 2024
e16fc30
Merge pull request #4118 from rust-lang/push-tskzrxpsrmox
chriskrycho Nov 27, 2024
de5487b
Merge remote-tracking branch 'fork/main' into only-new-async
Phosphorus-M Dec 8, 2024
66406b7
Merge branch 'main' into only-new-async
Phosphorus-M Dec 8, 2024
0f8536f
docs: translate the first chapter about async await
Phosphorus-M Dec 19, 2024
ff498f5
docs: translate the chapter 17-01
Phosphorus-M Dec 19, 2024
17dd9ce
docs: translate the chapter 17-06
Phosphorus-M Dec 19, 2024
a452434
docs: translate the chapter 17-05
Phosphorus-M Dec 25, 2024
1d2b51c
Merge remote-tracking branch 'origin/main' into only-new-async
Phosphorus-M Dec 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 17 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
- name: Install Rust
run: |
rustup set profile minimal
rustup toolchain install 1.78 -c rust-docs
rustup default 1.78
rustup toolchain install 1.82 -c rust-docs
rustup default 1.82
- name: Install mdbook
run: |
mkdir bin
Expand All @@ -25,8 +25,19 @@ jobs:
rustup --version
rustc -Vv
mdbook --version

# mdBook does not currently have particularly good support for “external”
# crates. To make the test suite work correctly with `trpl`, we must first
# build `trpl` itself (`mdbook` will not do it), and then explicitly pass
# its `deps` path as a library search path for `mdbook test`. That will make
# sure all the crates can be resolved when running the tests.
- name: Build `trpl` crate
run: |
cd packages/trpl
cargo build
- name: Run tests
run: mdbook test
run:
mdbook test --library-path packages/trpl/target/debug/deps
package_tests:
name: Run package tests
runs-on: ubuntu-latest
Expand All @@ -37,8 +48,8 @@ jobs:
- name: Install Rust
run: |
rustup set profile minimal
rustup toolchain install 1.76 -c rust-docs
rustup default 1.76
rustup toolchain install 1.82 -c rust-docs
rustup default 1.82
- name: Run `tools` package tests
run: |
cargo test
Expand Down Expand Up @@ -83,7 +94,7 @@ jobs:
aspell --version
shellcheck --version
- name: Shellcheck
run: find . -name '*.sh' | xargs shellcheck
run: find . -name '*.sh' -print0 | xargs -0 shellcheck
- name: Spellcheck
run: bash ci/spellcheck.sh list
- name: Lint for local file paths
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ book/
target
tmp

.nova
4 changes: 2 additions & 2 deletions 2018-edition/src/ch17-00-oop.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch17-00-oop.html) instead.
version of the book](../ch18-00-oop.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch17-00-oop.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch17-00-oop.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch17-01-what-is-oo.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch17-01-what-is-oo.html) instead.
version of the book](../ch18-01-what-is-oo.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch17-01-what-is-oo.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch17-01-what-is-oo.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch17-02-trait-objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch17-02-trait-objects.html) instead.
version of the book](../ch18-02-trait-objects.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch17-02-trait-objects.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch17-02-trait-objects.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch17-03-oo-design-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch17-03-oo-design-patterns.html) instead.
version of the book](../ch18-03-oo-design-patterns.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch17-03-oo-design-patterns.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch17-03-oo-design-patterns.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch18-00-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch18-00-patterns.html) instead.
version of the book](../ch19-00-patterns.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch18-00-patterns.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch18-00-patterns.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch18-01-all-the-places-for-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch18-01-all-the-places-for-patterns.html) instead.
version of the book](../ch19-01-all-the-places-for-patterns.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch18-01-all-the-places-for-patterns.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch18-01-all-the-places-for-patterns.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch18-02-refutability.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch18-02-refutability.html) instead.
version of the book](../ch19-02-refutability.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch18-02-refutability.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch18-02-refutability.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch18-03-pattern-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch18-03-pattern-syntax.html) instead.
version of the book](../ch19-03-pattern-syntax.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch18-03-pattern-syntax.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch18-03-pattern-syntax.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch19-00-advanced-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch19-00-advanced-features.html) instead.
version of the book](../ch20-00-advanced-features.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch19-00-advanced-features.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch19-00-advanced-features.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch19-01-unsafe-rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch19-01-unsafe-rust.html) instead.
version of the book](../ch20-01-unsafe-rust.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch19-01-unsafe-rust.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch19-01-unsafe-rust.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch19-03-advanced-traits.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch19-03-advanced-traits.html) instead.
version of the book](../ch20-03-advanced-traits.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch19-03-advanced-traits.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch19-03-advanced-traits.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch19-04-advanced-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch19-04-advanced-types.html) instead.
version of the book](../ch20-04-advanced-types.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch19-04-advanced-types.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch19-04-advanced-types.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch19-05-advanced-functions-and-closures.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch19-05-advanced-functions-and-closures.html) instead.
version of the book](../ch20-05-advanced-functions-and-closures.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch19-05-advanced-functions-and-closures.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch19-05-advanced-functions-and-closures.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch19-06-macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch19-06-macros.html) instead.
version of the book](../ch20-06-macros.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch19-06-macros.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch19-06-macros.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch20-00-final-project-a-web-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch20-00-final-project-a-web-server.html) instead.
version of the book](../ch21-00-final-project-a-web-server.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch20-00-final-project-a-web-server.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch20-00-final-project-a-web-server.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch20-01-single-threaded.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch20-01-single-threaded.html) instead.
version of the book](../ch21-01-single-threaded.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch20-01-single-threaded.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch20-01-single-threaded.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch20-02-multithreaded.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch20-02-multithreaded.html) instead.
version of the book](../ch21-02-multithreaded.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch20-02-multithreaded.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch20-02-multithreaded.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch20-03-graceful-shutdown-and-cleanup.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch20-03-graceful-shutdown-and-cleanup.html) instead.
version of the book](../ch21-03-graceful-shutdown-and-cleanup.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch20-03-graceful-shutdown-and-cleanup.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch20-03-graceful-shutdown-and-cleanup.html).
17 changes: 16 additions & 1 deletion ADMIN_TASKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ occasional maintenance tasks.
To update the `edition = "[year]"` metadata in all the listings' `Cargo.toml`s,
run the `./tools/update-editions.sh` script and commit the changes.

## Update the `edition` in mdBook config

Open `book.toml` and `nostarch/book.toml` and set the `edition` value in the
`[rust]` table to the new edition.

## Release a new version of the listings

We now make `.tar` files of complete projects containing every listing
Expand Down Expand Up @@ -68,7 +73,7 @@ extracted into a file. To do that:
- If you only want to show part of the code in the file, use anchor comments
(`// ANCHOR: some_tag` and `// ANCHOR_END: some_tag`) to mark the parts of
the file you want to show.
- For Rust code, use the `{{#rustdoc_include [fileame:some_tag]}}` directive
- For Rust code, use the `{{#rustdoc_include [filename:some_tag]}}` directive
within the code blocks in the text. The `rustdoc_include` directive gives the
code that doesn't get displayed to `rustdoc` for `mdbook test` purposes.
- For anything else, use the `{{#include [filename:some_tag]}}` directive.
Expand Down Expand Up @@ -133,3 +138,13 @@ $ dot dot/trpl04-01.dot -Tsvg > src/img/trpl04-01.svg
In the generated SVG, remove the width and the height attributes from the `svg`
element and set the `viewBox` attribute to `0.00 0.00 1000.00 1000.00` or other
values that don't cut off the image.

## Publish a preview to GitHub Pages

We sometimes publish to GitHub Pages for in-progress previews. The recommended
flow for publishing is:

- Install the `ghp-import` tool by running `pip install ghp-import` (or `pipx install ghp-import`, using [pipx][pipx]).
- In the root, run `tools/generate-preview.sh`

[pipx]: https://pipx.pypa.io/stable/#install-pipx
36 changes: 18 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading