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 @@ -15,8 +15,8 @@ jobs:
- name: Install Rust
run: |
rustup set profile minimal
rustup toolchain install 1.93 -c rust-docs
rustup default 1.93
rustup toolchain install 1.94 -c rust-docs
rustup default 1.94
- name: Install mdbook
run: |
mkdir bin
Expand Down Expand Up @@ -50,8 +50,8 @@ jobs:
- name: Install Rust
run: |
rustup set profile minimal
rustup toolchain install 1.93 -c rust-docs
rustup default 1.93
rustup toolchain install 1.94 -c rust-docs
rustup default 1.94
- name: Run `tools` package tests
run: |
cargo test
Expand Down
4 changes: 2 additions & 2 deletions listings/ch02-guessing-game-tutorial/listing-02-04/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ error[E0308]: mismatched types
= note: expected reference `&String`
found reference `&{integer}`
note: method defined here
--> file:///home/.rustup/toolchains/1.93/lib/rustlib/src/rust/library/core/src/cmp.rs:987:8
--> file:///home/.rustup/toolchains/1.94/lib/rustlib/src/rust/library/core/src/cmp.rs:991:8
|
987 | fn cmp(&self, other: &Self) -> Ordering;
991 | fn cmp(&self, other: &Self) -> Ordering;
| ^^^

For more information about this error, try `rustc --explain E0308`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,24 @@ error[E0277]: cannot add `Option<i8>` to `i8`
|
= help: the trait `Add<Option<i8>>` is not implemented for `i8`
help: the following other types implement trait `Add<Rhs>`
--> file:///home/.rustup/toolchains/1.93/lib/rustlib/src/rust/library/core/src/ops/arith.rs:114:1
--> file:///home/.rustup/toolchains/1.94/lib/rustlib/src/rust/library/core/src/ops/arith.rs:99:9
|
99 | impl const Add for $t {
| ^^^^^^^^^^^^^^^^^^^^^ `i8` implements `Add`
...
114 | add_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f16 f32 f64 f128 }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| `&i8` implements `Add<i8>`
| `&i8` implements `Add`
| `i8` implements `Add<&i8>`
| `i8` implements `Add`
| ---------------------------------------------------------------------------------- in this macro invocation
|
::: /Users/carolnichols/.rustup/toolchains/1.94-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/internal_macros.rs:22:9
|
22 | impl const $imp<$u> for &$t {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&i8` implements `Add<i8>`
...
33 | impl const $imp<&$u> for $t {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `i8` implements `Add<&i8>`
...
44 | impl const $imp<&$u> for &$t {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&i8` implements `Add`
= note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0277`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ error[E0004]: non-exhaustive patterns: `None` not covered
| ^ pattern `None` not covered
|
note: `Option<i32>` defined here
--> file:///home/.rustup/toolchains/1.93/lib/rustlib/src/rust/library/core/src/option.rs:600:1
--> file:///home/.rustup/toolchains/1.94/lib/rustlib/src/rust/library/core/src/option.rs:600:1
|
600 | pub enum Option<T> {
| ^^^^^^^^^^^^^^^^^^
Expand Down
4 changes: 2 additions & 2 deletions listings/ch08-common-collections/listing-08-19/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ error[E0277]: the type `str` cannot be indexed by `{integer}`
= note: you can use `.chars().nth()` or `.bytes().nth()`
for more information, see chapter 8 in The Book: <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>
help: the following other types implement trait `SliceIndex<T>`
--> file:///home/.rustup/toolchains/1.93/lib/rustlib/src/rust/library/core/src/slice/index.rs:214:1
--> file:///home/.rustup/toolchains/1.94/lib/rustlib/src/rust/library/core/src/slice/index.rs:214:1
|
214 | unsafe impl<T> const SliceIndex<[T]> for usize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `usize` implements `SliceIndex<[T]>`
|
::: /Users/carolnichols/.rustup/toolchains/1.93-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/bstr/traits.rs:203:1
::: /Users/carolnichols/.rustup/toolchains/1.94-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/bstr/traits.rs:203:1
|
203 | unsafe impl SliceIndex<ByteStr> for usize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `usize` implements `SliceIndex<ByteStr>`
Expand Down
2 changes: 1 addition & 1 deletion listings/ch13-functional-features/listing-13-08/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ error[E0507]: cannot move out of `value`, a captured variable in an `FnMut` clos
| ^^^^^ `value` is moved here
|
help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but `FnOnce` closures may consume them only once
--> file:///home/.rustup/toolchains/1.93/lib/rustlib/src/rust/library/alloc/src/slice.rs:249:12
--> file:///home/.rustup/toolchains/1.94/lib/rustlib/src/rust/library/alloc/src/slice.rs:249:12
|
249 | F: FnMut(&T) -> K,
| ^^^^^^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
$ cargo run
Compiling deref-example v0.1.0 (file:///projects/deref-example)
error[E0277]: can't compare `{integer}` with `&{integer}`
--> src/main.rs:6:5
|
6 | assert_eq!(5, y);
| ^^^^^^^^^^^^^^^^ no implementation for `{integer} == &{integer}`
|
= help: the trait `PartialEq<&{integer}>` is not implemented for `{integer}`
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
--> src/main.rs:6:5
|
6 | assert_eq!(5, y);
| ^^^^^^^^^^^^^^^^ no implementation for `{integer} == &{integer}`
|
= help: the trait `PartialEq<&{integer}>` is not implemented for `{integer}`
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider dereferencing here
--> file:///home/.rustup/toolchains/1.93/lib/rustlib/src/rust/library/core/src/macros/mod.rs:46:35
|
46| if !(*left_val == **right_val) {
| +
--> file:///home/.rustup/toolchains/1.94/lib/rustlib/src/rust/library/core/src/macros/mod.rs:46:35
|
46 | if !(*left_val == **right_val) {
| +

For more information about this error, try `rustc --explain E0277`.
error: could not compile `deref-example` (bin "deref-example") due to 1 previous error
8 changes: 0 additions & 8 deletions listings/ch16-fearless-concurrency/listing-16-13/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@ error[E0382]: borrow of moved value: `counter`
...
21 | println!("Result: {}", *counter.lock().unwrap());
| ^^^^^^^ value borrowed here after move
|
help: consider moving the expression out of the loop so it is only moved once
|
8 ~ let mut value = counter.lock();
9 ~ for _ in 0..10 {
10 | let handle = thread::spawn(move || {
11 ~ let mut num = value.unwrap();
|

For more information about this error, try `rustc --explain E0382`.
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 @@ -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`
--> file:///home/.rustup/toolchains/1.93/lib/rustlib/src/rust/library/std/src/thread/functions.rs:128:8
--> file:///home/.rustup/toolchains/1.94/lib/rustlib/src/rust/library/std/src/thread/functions.rs:128:8
|
125 | pub fn spawn<F, T>(f: F) -> JoinHandle<T>
| ----- required by a bound in this function
Expand Down
2 changes: 1 addition & 1 deletion listings/ch18-oop/listing-18-10/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ error[E0277]: the trait bound `String: Draw` is not satisfied
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Draw` is not implemented for `String`
|
help: the trait `Draw` is implemented for `Button`
--> /Users/carolnichols/rust/book/tmp/listings/ch18-oop/listing-18-10/src/lib.rs:23:1
--> src/lib.rs:23:1
|
23 | impl Draw for Button {
| ^^^^^^^^^^^^^^^^^^^^
Expand Down
6 changes: 0 additions & 6 deletions listings/ch21-web-server/listing-21-17/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ note: consider changing this parameter type in method `new` to borrow instead if
|
47 | fn new(id: usize, receiver: mpsc::Receiver<Job>) -> Worker {
| --- in this method ^^^^^^^^^^^^^^^^^^^ this parameter takes ownership of the value
help: consider moving the expression out of the loop so it is only moved once
|
25 ~ let mut value = Worker::new(id, receiver);
26 ~ for id in 0..size {
27 ~ workers.push(value);
|

For more information about this error, try `rustc --explain E0382`.
error: could not compile `hello` (lib) due to 1 previous error
4 changes: 2 additions & 2 deletions listings/ch21-web-server/listing-21-22/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ 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`
--> file:///home/.rustup/toolchains/1.93/lib/rustlib/src/rust/library/std/src/thread/join_handle.rs:148:17
--> file:///home/.rustup/toolchains/1.94/lib/rustlib/src/rust/library/std/src/thread/join_handle.rs:147:17
|
148 | pub fn join(self) -> Result<T> {
147 | pub fn join(self) -> Result<T> {
| ^^^^

For more information about this error, try `rustc --explain E0507`.
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.93
1.94
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.93.1 (released 2026-02-12)
This version of the text assumes you’re using Rust 1.94.1 (released 2026-03-26)
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