Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 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.88 -c rust-docs
rustup default 1.88
rustup toolchain install 1.89 -c rust-docs
rustup default 1.89
- name: Install mdbook
run: |
mkdir bin
Expand Down Expand Up @@ -47,8 +47,8 @@ jobs:
- name: Install Rust
run: |
rustup set profile minimal
rustup toolchain install 1.88 -c rust-docs
rustup default 1.88
rustup toolchain install 1.89 -c rust-docs
rustup default 1.89
- name: Run `tools` package tests
run: |
cargo test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ error[E0308]: mismatched types
= note: expected reference `&String`
found reference `&{integer}`
note: method defined here
--> /rustc/6b00bc3880198600130e1cf62b8f8a93494488cc/library/core/src/cmp.rs:975:8
--> /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library/core/src/cmp.rs:976:8

For more information about this error, try `rustc --explain E0308`.
error: could not compile `guessing_game` (bin "guessing_game") due to 1 previous error
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
$ cargo run
Compiling ownership v0.1.0 (file:///projects/ownership)
error[E0382]: borrow of moved value: `s1`
--> src/main.rs:5:15
--> src/main.rs:5:16
|
2 | let s1 = String::from("hello");
| -- move occurs because `s1` has type `String`, which does not implement the `Copy` trait
3 | let s2 = s1;
| -- value moved here
4 |
5 | println!("{s1}, world!");
| ^^^^ value borrowed here after move
| ^^ value borrowed here after move
|
= 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)
help: consider cloning the value if the performance cost is acceptable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ error[E0499]: cannot borrow `s` as mutable more than once at a time
| ^^^^^^ second mutable borrow occurs here
6 |
7 | println!("{r1}, {r2}");
| ---- first borrow later used here
| -- first borrow later used here

For more information about this error, try `rustc --explain E0499`.
error: could not compile `ownership` (bin "ownership") due to 1 previous error
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ error[E0502]: cannot borrow `s` as mutable because it is also borrowed as immuta
| ^^^^^^ mutable borrow occurs here
7 |
8 | println!("{r1}, {r2}, and {r3}");
| ---- immutable borrow later used here
| -- immutable borrow later used here

For more information about this error, try `rustc --explain E0502`.
error: could not compile `ownership` (bin "ownership") due to 1 previous error
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ error[E0502]: cannot borrow `s` as mutable because it is also borrowed as immuta
| ^^^^^^^^^ mutable borrow occurs here
19 |
20 | println!("the first word is: {word}");
| ------ immutable borrow later used here
| ---- immutable borrow later used here

For more information about this error, try `rustc --explain E0502`.
error: could not compile `ownership` (bin "ownership") due to 1 previous error
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
$ cargo run
Compiling rectangles v0.1.0 (file:///projects/rectangles)
error[E0277]: `Rectangle` doesn't implement `std::fmt::Display`
--> src/main.rs:12:24
--> src/main.rs:12:25
|
12 | println!("rect1 is {rect1}");
| ^^^^^^^ `Rectangle` cannot be formatted with the default formatter
| -^^^^^-
| ||
| |`Rectangle` cannot be formatted with the default formatter
| required by this formatting parameter
|
= help: the trait `std::fmt::Display` is not implemented for `Rectangle`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ error[E0277]: `Rectangle` doesn't implement `Debug`
--> src/main.rs:12:31
|
12 | println!("rect1 is {:?}", rect1);
| ^^^^^ `Rectangle` cannot be formatted using `{:?}`
| ---- ^^^^^ `Rectangle` cannot be formatted using `{:?}` because it doesn't implement `Debug`
| |
| required by this formatting parameter
|
= help: the trait `Debug` is not implemented for `Rectangle`
= note: add `#[derive(Debug)]` to `Rectangle` or manually `impl Debug for Rectangle`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ error[E0004]: non-exhaustive patterns: `None` not covered
| ^ pattern `None` not covered
|
note: `Option<i32>` defined here
--> /rustc/6b00bc3880198600130e1cf62b8f8a93494488cc/library/core/src/option.rs:589:1
::: /rustc/6b00bc3880198600130e1cf62b8f8a93494488cc/library/core/src/option.rs:593:5
--> /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library/core/src/option.rs:591:1
::: /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library/core/src/option.rs:595:5
|
= note: not covered
= note: the matched value is of type `Option<i32>`
Expand Down
2 changes: 1 addition & 1 deletion listings/ch08-common-collections/listing-08-06/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immuta
| ^^^^^^^^^ mutable borrow occurs here
7 |
8 | println!("The first element is: {first}");
| ------- immutable borrow later used here
| ----- immutable borrow later used here

For more information about this error, try `rustc --explain E0502`.
error: could not compile `collections` (bin "collections") due to 1 previous error
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ error[E0597]: `x` does not live long enough
| - `x` dropped here while still borrowed
8 |
9 | println!("r: {r}");
| --- borrow later used here
| - borrow later used here

For more information about this error, try `rustc --explain E0597`.
error: could not compile `chapter10` (bin "chapter10") due to 1 previous error
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ error[E0597]: `string2` does not live long enough
7 | }
| - `string2` dropped here while still borrowed
8 | println!("The longest string is {result}");
| -------- borrow later used here
| ------ borrow later used here

For more information about this error, try `rustc --explain E0597`.
error: could not compile `chapter10` (bin "chapter10") due to 1 previous error
2 changes: 1 addition & 1 deletion listings/ch15-smart-pointers/listing-15-23/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ failures:
---- tests::it_sends_an_over_75_percent_warning_message stdout ----

thread 'tests::it_sends_an_over_75_percent_warning_message' panicked at src/lib.rs:60:53:
already borrowed: BorrowMutError
RefCell already borrowed
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


Expand Down
4 changes: 2 additions & 2 deletions listings/ch16-fearless-concurrency/listing-16-09/output.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
$ cargo run
Compiling message-passing v0.1.0 (file:///projects/message-passing)
error[E0382]: borrow of moved value: `val`
--> src/main.rs:10:26
--> src/main.rs:10:27
|
8 | let val = String::from("hi");
| --- move occurs because `val` has type `String`, which does not implement the `Copy` trait
9 | tx.send(val).unwrap();
| --- value moved here
10 | println!("val is {val}");
| ^^^^^ value borrowed here after move
| ^^^ value borrowed here after move
|
= 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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ note: required because it's used within this closure
11 | let handle = thread::spawn(move || {
| ^^^^^^^
note: required by a bound in `spawn`
--> /rustc/6b00bc3880198600130e1cf62b8f8a93494488cc/library/std/src/thread/mod.rs:723:1
--> /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library/std/src/thread/mod.rs:723:1

For more information about this error, try `rustc --explain E0277`.
error: could not compile `shared-state` (bin "shared-state") due to 1 previous error
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ error[E0277]: `Point` doesn't implement `std::fmt::Display`
--> src/main.rs:20:23
|
20 | impl OutlinePrint for Point {}
| ^^^^^ `Point` cannot be formatted with the default formatter
| ^^^^^ the trait `std::fmt::Display` is not implemented for `Point`
|
= help: the trait `std::fmt::Display` is not implemented for `Point`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
note: required by a bound in `OutlinePrint`
--> src/main.rs:3:21
|
Expand All @@ -18,10 +16,8 @@ error[E0277]: `Point` doesn't implement `std::fmt::Display`
--> src/main.rs:24:7
|
24 | p.outline_print();
| ^^^^^^^^^^^^^ `Point` cannot be formatted with the default formatter
| ^^^^^^^^^^^^^ the trait `std::fmt::Display` is not implemented for `Point`
|
= help: the trait `std::fmt::Display` is not implemented for `Point`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
note: required by a bound in `OutlinePrint::outline_print`
--> src/main.rs:3:21
|
Expand Down
2 changes: 1 addition & 1 deletion listings/ch21-web-server/listing-21-22/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ error[E0507]: cannot move out of `worker.thread` which is behind a mutable refer
| move occurs because `worker.thread` has type `JoinHandle<()>`, which does not implement the `Copy` trait
|
note: `JoinHandle::<T>::join` takes ownership of the receiver `self`, which moves `worker.thread`
--> /rustc/6b00bc3880198600130e1cf62b8f8a93494488cc/library/std/src/thread/mod.rs:1896:17
--> /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library/std/src/thread/mod.rs:1896:17

For more information about this error, try `rustc --explain E0507`.
error: could not compile `hello` (lib) due to 1 previous error
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.88
1.89
2 changes: 1 addition & 1 deletion src/title-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
_by Steve Klabnik, Carol Nichols, and Chris Krycho, with contributions from the
Rust Community_

This version of the text assumes you’re using Rust 1.88.0 (released 2025-06-26)
This version of the text assumes you’re using Rust 1.89.0 (released 2025-08-07)
or later with `edition = "2024"` in the *Cargo.toml* file of all projects to
configure them to use Rust 2024 Edition idioms. See the [“Installation” section
of Chapter 1][install]<!-- ignore --> for instructions on installing or
Expand Down