Skip to content

Commit bb930c9

Browse files
committed
Merge remote-tracking branch 'upstream/main' into dev
2 parents e22036a + 05d1142 commit bb930c9

391 files changed

Lines changed: 10925 additions & 39475 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/main.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ env:
1414
AQUASCOPE_VERSION: 0.3.8
1515
AQUASCOPE_TOOLCHAIN: nightly-2024-12-15
1616

17+
env:
18+
MDBOOK_VERSION: 0.5.1
19+
1720
jobs:
1821
test:
1922
name: Run tests
@@ -35,8 +38,8 @@ jobs:
3538
- name: Install Rust
3639
run: |
3740
rustup set profile minimal
38-
rustup toolchain install 1.85 -c rust-docs
39-
rustup default 1.85
41+
rustup toolchain install 1.90 -c rust-docs
42+
rustup default 1.90
4043
4144
- name: Install Depot
4245
run: curl https://raw.githubusercontent.com/cognitive-engineering-lab/depot/main/scripts/install.sh | sh

2018-edition/book.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[book]
22
title = "The Rust Programming Language"
3-
author = "Steve Klabnik and Carol Nichols, with Contributions from the Rust Community"
3+
authors = ["Steve Klabnik", "Carol Nichols", "Contributions from the Rust Community"]
44

55
[output.html]
66
additional-css = ["ferris.css"]

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ they only get updated when edits are sent to No Starch. **Do not submit pull
1212
requests changing files in the `nostarch` directory, they will be closed.**
1313

1414
We use [`rustfmt`][rustfmt] to apply standard formatting to Rust code in the
15-
repo and [`dprint`][dprint] to apply standing formatting to the Markdown source
15+
repo and [`dprint`][dprint] to apply standard formatting to the Markdown source
1616
and the non-Rust code in the project.
1717

1818
[rustfmt]: https://github.com/rust-lang/rustfmt

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Building the book requires [mdBook], ideally the same version that
2929
rust-lang/rust uses in [this file][rust-mdbook]. To get it:
3030

3131
[mdBook]: https://github.com/rust-lang/mdBook
32-
[rust-mdbook]: https://github.com/rust-lang/rust/blob/master/src/tools/rustbook/Cargo.toml
32+
[rust-mdbook]: https://github.com/rust-lang/rust/blob/HEAD/src/tools/rustbook/Cargo.toml
3333

3434
```bash
3535
$ cargo install mdbook --locked --version <version_num>

book.toml

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ additional-css = [
1111
"theme/semantic-notes.css",
1212
"theme/listing.css",
1313
"theme/2018-edition.css",
14-
"js-extensions/packages/consent-form/dist/index.css",
14+
# Not doing any research right now, so no need to pester users with a form.
15+
# "js-extensions/packages/consent-form/dist/index.css",
1516
"js-extensions/packages/feedback/dist/index.css",
1617
]
1718
additional-js = [
1819
"ferris.js",
19-
"js-extensions/packages/telemetry/dist/index.js",
20-
"js-extensions/packages/consent-form/dist/index.js",
20+
# "js-extensions/packages/telemetry/dist/index.js",
21+
# "js-extensions/packages/consent-form/dist/index.js",
2122
"js-extensions/packages/feedback/dist/index.js",
2223
]
2324

@@ -29,18 +30,47 @@ validate = true
2930
cache-answers = true
3031
more-words = "words.dic"
3132

32-
[preprocessor.aquascope]
33+
# [preprocessor.aquascope]
3334

3435
# [build]
3536
# extra-watch-dirs = ["quizzes", "../mdbook-quiz/target/debug", "js-extensions/packages/feedback/dist"]
37+
[output.html.search]
38+
use-boolean-and = true
39+
40+
[output.html.redirect]
41+
"ch17-00-oop.html" = "ch18-00-oop.html"
42+
"ch17-01-what-is-oo.html" = "ch18-01-what-is-oo.html"
43+
"ch17-02-trait-objects.html" = "ch18-02-trait-objects.html"
44+
"ch17-03-oo-design-patterns.html" = "ch18-03-oo-design-patterns.html"
45+
"ch18-00-patterns.html" = "ch19-00-patterns.html"
46+
"ch18-01-all-the-places-for-patterns.html" = "ch19-01-all-the-places-for-patterns.html"
47+
"ch18-02-refutability.html" = "ch19-02-refutability.html"
48+
"ch18-03-pattern-syntax.html" = "ch19-03-pattern-syntax.html"
49+
"ch19-00-advanced-features.html" = "ch20-00-advanced-features.html"
50+
"ch19-01-unsafe-rust.html" = "ch20-01-unsafe-rust.html"
51+
"ch19-03-advanced-traits.html" = "ch20-02-advanced-traits.html"
52+
"ch20-03-advanced-traits.html" = "ch20-02-advanced-traits.html"
53+
"ch19-04-advanced-types.html" = "ch20-03-advanced-types.html"
54+
"ch20-04-advanced-types.html" = "ch20-03-advanced-types.html"
55+
"ch19-05-advanced-functions-and-closures.html" = "ch20-04-advanced-functions-and-closures.html"
56+
"ch20-05-advanced-functions-and-closures.html" = "ch20-04-advanced-functions-and-closures.html"
57+
"ch19-06-macros.html" = "ch20-05-macros.html"
58+
"ch20-06-macros.html" = "ch20-05-macros.html"
59+
"ch20-00-final-project-a-web-server.html" = "ch21-00-final-project-a-web-server.html"
60+
"ch20-01-single-threaded.html" = "ch21-01-single-threaded.html"
61+
"ch20-02-multithreaded.html" = "ch21-02-multithreaded.html"
62+
"ch20-03-graceful-shutdown-and-cleanup.html" = "ch21-03-graceful-shutdown-and-cleanup.html"
3663

3764
# Do not sync this preprocessor; it is for the HTML renderer only.
3865
[preprocessor.trpl-note]
66+
command = "cargo run --manifest-path packages/mdbook-trpl/Cargo.toml --bin mdbook-trpl-note"
3967

4068
[preprocessor.trpl-listing]
69+
command = "cargo run --manifest-path packages/mdbook-trpl/Cargo.toml --bin mdbook-trpl-listing"
4170
output-mode = "default"
4271

43-
# [output.linkcheck]
44-
4572
[rust]
46-
edition = "2024"
73+
edition = "2024"
74+
75+
[build]
76+
extra-watch-dirs = ["packages/mdbook-trpl"]

ci/dictionary.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ booleans
5959
Bors
6060
BorrowMutError
6161
BoxMeUp
62+
boxt
6263
BTreeSet
6364
BufRead
6465
BufReader
@@ -164,6 +165,8 @@ Enums
164165
eprintln
165166
Erlang
166167
ErrorKind
168+
Español
169+
ETAPS
167170
eval
168171
executables
169172
ExitCode
@@ -304,6 +307,7 @@ memoization
304307
metadata
305308
Metadata
306309
metaprogramming
310+
metavariable
307311
mibbit
308312
Mibbit
309313
microcontroller
@@ -334,6 +338,7 @@ mutexes
334338
Mutexes
335339
MutexGuard
336340
mutext
341+
mutextarct
337342
MyAsyncStateMachine
338343
MyBox
339344
myprogram
@@ -366,6 +371,7 @@ OpenGL
366371
optimizations
367372
OptionalFloatingPointNumber
368373
OptionalNumber
374+
optiont
369375
OsStr
370376
OsString
371377
other's
@@ -428,6 +434,7 @@ refactoring
428434
refcell
429435
RefCell
430436
refcellt
437+
refcelltrct
431438
RefMut
432439
reformats
433440
refutability
@@ -443,6 +450,7 @@ retweet
443450
rewordings
444451
rint
445452
ripgrep
453+
Rumbul
446454
runnable
447455
runtime
448456
runtimes
@@ -580,6 +588,7 @@ unsynchronized
580588
Unyank
581589
UpperCamelCase
582590
URIs
591+
urls
583592
UsefulType
584593
username
585594
USERPROFILE
@@ -602,6 +611,7 @@ waitlist
602611
wasn
603612
weakt
604613
WeatherForecast
614+
webpage
605615
WebSocket
606616
whitespace
607617
wildcard

first-edition/book.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[book]
22
title = "The Rust Programming Language"
3-
author = "The Rust Project Developers"
3+
authors = ["The Rust Project Developers"]

listings/ch02-guessing-game-tutorial/listing-02-04/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ error[E0308]: mismatched types
1818
= note: expected reference `&String`
1919
found reference `&{integer}`
2020
note: method defined here
21-
--> /rustc/4eb161250e340c8f48f66e2b929ef4a5bed7c181/library/core/src/cmp.rs:964:8
21+
--> /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/cmp.rs:979:8
2222

2323
For more information about this error, try `rustc --explain E0308`.
2424
error: could not compile `guessing_game` (bin "guessing_game") due to 1 previous error

listings/ch04-understanding-ownership/no-listing-04-cant-use-after-move/output.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
$ cargo run
22
Compiling ownership v0.1.0 (file:///projects/ownership)
33
error[E0382]: borrow of moved value: `s1`
4-
--> src/main.rs:5:15
4+
--> src/main.rs:5:16
55
|
66
2 | let s1 = String::from("hello");
77
| -- move occurs because `s1` has type `String`, which does not implement the `Copy` trait
88
3 | let s2 = s1;
99
| -- value moved here
1010
4 |
1111
5 | println!("{s1}, world!");
12-
| ^^^^ value borrowed here after move
12+
| ^^ value borrowed here after move
1313
|
1414
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
1515
help: consider cloning the value if the performance cost is acceptable

listings/ch04-understanding-ownership/no-listing-10-multiple-mut-not-allowed/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ error[E0499]: cannot borrow `s` as mutable more than once at a time
99
| ^^^^^^ second mutable borrow occurs here
1010
6 |
1111
7 | println!("{r1}, {r2}");
12-
| ---- first borrow later used here
12+
| -- first borrow later used here
1313

1414
For more information about this error, try `rustc --explain E0499`.
1515
error: could not compile `ownership` (bin "ownership") due to 1 previous error

0 commit comments

Comments
 (0)