Upgrade to rust 1.99.1
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1e5e87d..0394f52 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml
@@ -15,8 +15,8 @@ - name: Install Rust run: | rustup set profile minimal - rustup toolchain install 1.98 -c rust-docs - rustup default 1.98 + rustup toolchain install 1.99 -c rust-docs + rustup default 1.99 - name: Install mdbook run: | mkdir bin @@ -50,8 +50,8 @@ - name: Install Rust run: | rustup set profile minimal - rustup toolchain install 1.98 -c rust-docs - rustup default 1.98 + rustup toolchain install 1.99 -c rust-docs + rustup default 1.99 - name: Run `tools` package tests run: | cargo test
diff --git a/listings/ch02-guessing-game-tutorial/listing-02-04/output.txt b/listings/ch02-guessing-game-tutorial/listing-02-04/output.txt index 2876911..a9a595c 100644 --- a/listings/ch02-guessing-game-tutorial/listing-02-04/output.txt +++ b/listings/ch02-guessing-game-tutorial/listing-02-04/output.txt
@@ -1,8 +1,8 @@ $ cargo build Compiling libc v0.2.186 + Compiling getrandom v0.4.3 Compiling rand_core v0.10.1 Compiling cfg-if v1.0.0 - Compiling getrandom v0.4.3 Compiling chacha20 v0.10.1 Compiling rand v0.10.1 Compiling guessing_game v0.1.0 (file:///projects/guessing_game) @@ -17,7 +17,7 @@ = note: expected reference `&String` found reference `&{integer}` note: method defined here - --> /rustc/88d9e12ae178fab0fb5cc050a94da85685d449ea/library/core/src/cmp.rs:1000:7 + --> /rustc/58cf8f9c35b355199727627d07ae34a4e2846d67/library/core/src/cmp.rs:1012:7 For more information about this error, try `rustc --explain E0308`. error: could not compile `guessing_game` (bin "guessing_game") due to 1 previous error
diff --git a/listings/ch03-common-programming-concepts/output-only-01-no-type-annotations/output.txt b/listings/ch03-common-programming-concepts/output-only-01-no-type-annotations/output.txt index ee6a979..ea69f03 100644 --- a/listings/ch03-common-programming-concepts/output-only-01-no-type-annotations/output.txt +++ b/listings/ch03-common-programming-concepts/output-only-01-no-type-annotations/output.txt
@@ -7,6 +7,9 @@ | ^^^^^ ----- type must be known at this point | = note: cannot satisfy `<_ as FromStr>::Err == _` + = note: the type must also implement `FromStr` +note: required by a bound in `core::str::<impl str>::parse` + --> /rustc/58cf8f9c35b355199727627d07ae34a4e2846d67/library/core/src/str/mod.rs:2782:4 help: consider giving `guess` an explicit type | 2 | let guess: /* Type */ = "42".parse().expect("Not a number!");
diff --git a/listings/ch05-using-structs-to-structure-related-data/listing-05-11/output.txt b/listings/ch05-using-structs-to-structure-related-data/listing-05-11/output.txt index dc5331d..8b812a0 100644 --- a/listings/ch05-using-structs-to-structure-related-data/listing-05-11/output.txt +++ b/listings/ch05-using-structs-to-structure-related-data/listing-05-11/output.txt
@@ -11,7 +11,7 @@ | 1 | struct Rectangle { | ^^^^^^^^^^^^^^^^ - = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead + = note: in format strings you may be able to use `{:?}` (or `{:#?}` for pretty-print) instead For more information about this error, try `rustc --explain E0277`. error: could not compile `rectangles` (bin "rectangles") due to 1 previous error
diff --git a/listings/ch06-enums-and-pattern-matching/no-listing-07-cant-use-option-directly/output.txt b/listings/ch06-enums-and-pattern-matching/no-listing-07-cant-use-option-directly/output.txt index 8c7d064..e7fb60b 100644 --- a/listings/ch06-enums-and-pattern-matching/no-listing-07-cant-use-option-directly/output.txt +++ b/listings/ch06-enums-and-pattern-matching/no-listing-07-cant-use-option-directly/output.txt
@@ -8,19 +8,19 @@ | = help: the trait `Add<Option<i8>>` is not implemented for `i8` help: the following other types implement trait `Add<Rhs>` - --> /rustc/88d9e12ae178fab0fb5cc050a94da85685d449ea/library/core/src/ops/arith.rs:98:8 + --> /rustc/58cf8f9c35b355199727627d07ae34a4e2846d67/library/core/src/ops/arith.rs:98:8 | = note: `i8` implements `Add` - ::: /rustc/88d9e12ae178fab0fb5cc050a94da85685d449ea/library/core/src/ops/arith.rs:113:0 + ::: /rustc/58cf8f9c35b355199727627d07ae34a4e2846d67/library/core/src/ops/arith.rs:113:0 | = note: in this macro invocation - --> /rustc/88d9e12ae178fab0fb5cc050a94da85685d449ea/library/core/src/internal_macros.rs:22:8 + --> /rustc/58cf8f9c35b355199727627d07ae34a4e2846d67/library/core/src/internal_macros.rs:22:8 | = note: `&i8` implements `Add<i8>` - ::: /rustc/88d9e12ae178fab0fb5cc050a94da85685d449ea/library/core/src/internal_macros.rs:33:8 + ::: /rustc/58cf8f9c35b355199727627d07ae34a4e2846d67/library/core/src/internal_macros.rs:33:8 | = note: `i8` implements `Add<&i8>` - ::: /rustc/88d9e12ae178fab0fb5cc050a94da85685d449ea/library/core/src/internal_macros.rs:44:8 + ::: /rustc/58cf8f9c35b355199727627d07ae34a4e2846d67/library/core/src/internal_macros.rs:44:8 | = note: `&i8` implements `Add` = note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
diff --git a/listings/ch06-enums-and-pattern-matching/no-listing-10-non-exhaustive-match/output.txt b/listings/ch06-enums-and-pattern-matching/no-listing-10-non-exhaustive-match/output.txt index 3c4f3d4..1d6e7bd 100644 --- a/listings/ch06-enums-and-pattern-matching/no-listing-10-non-exhaustive-match/output.txt +++ b/listings/ch06-enums-and-pattern-matching/no-listing-10-non-exhaustive-match/output.txt
@@ -7,8 +7,8 @@ | ^ pattern `None` not covered | note: `Option<i32>` defined here - --> /rustc/88d9e12ae178fab0fb5cc050a94da85685d449ea/library/core/src/option.rs:598:0 - ::: /rustc/88d9e12ae178fab0fb5cc050a94da85685d449ea/library/core/src/option.rs:602:4 + --> /rustc/58cf8f9c35b355199727627d07ae34a4e2846d67/library/core/src/option.rs:598:0 + ::: /rustc/58cf8f9c35b355199727627d07ae34a4e2846d67/library/core/src/option.rs:602:4 | = note: not covered = note: the matched value is of type `Option<i32>`
diff --git a/listings/ch08-common-collections/listing-08-19/output.txt b/listings/ch08-common-collections/listing-08-19/output.txt index 160a140..f88b0f1 100644 --- a/listings/ch08-common-collections/listing-08-19/output.txt +++ b/listings/ch08-common-collections/listing-08-19/output.txt
@@ -10,10 +10,10 @@ = 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: `usize` implements trait `SliceIndex<T>` - --> /rustc/88d9e12ae178fab0fb5cc050a94da85685d449ea/library/core/src/slice/index.rs:179:0 + --> /rustc/58cf8f9c35b355199727627d07ae34a4e2846d67/library/core/src/slice/index.rs:179:0 | = note: `SliceIndex<[T]>` - --> /rustc/88d9e12ae178fab0fb5cc050a94da85685d449ea/library/core/src/bstr/traits.rs:197:0 + --> /rustc/58cf8f9c35b355199727627d07ae34a4e2846d67/library/core/src/bstr/traits.rs:197:0 | = note: `SliceIndex<ByteStr>` = note: required for `String` to implement `Index<{integer}>`
diff --git a/listings/ch12-an-io-project/listing-12-19/output.txt b/listings/ch12-an-io-project/listing-12-19/output.txt index ed87e4f..48ed5ea 100644 --- a/listings/ch12-an-io-project/listing-12-19/output.txt +++ b/listings/ch12-an-io-project/listing-12-19/output.txt
@@ -6,7 +6,7 @@ running 1 test test tests::one_result ... ok -test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s +test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s Running unittests src/main.rs (target/debug/deps/minigrep-9cd200e5fac0fc94)
diff --git a/listings/ch13-functional-features/listing-13-08/output.txt b/listings/ch13-functional-features/listing-13-08/output.txt index a7cd989..6221939 100644 --- a/listings/ch13-functional-features/listing-13-08/output.txt +++ b/listings/ch13-functional-features/listing-13-08/output.txt
@@ -14,7 +14,7 @@ | ^^^^^ `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 - --> /rustc/88d9e12ae178fab0fb5cc050a94da85685d449ea/library/alloc/src/slice.rs:249:11 + --> /rustc/58cf8f9c35b355199727627d07ae34a4e2846d67/library/alloc/src/slice.rs:249:11 help: consider cloning the value if the performance cost is acceptable | 18 | sort_operations.push(value.clone());
diff --git a/listings/ch16-fearless-concurrency/listing-16-14/output.txt b/listings/ch16-fearless-concurrency/listing-16-14/output.txt index dac2ea4..e5985bb 100644 --- a/listings/ch16-fearless-concurrency/listing-16-14/output.txt +++ b/listings/ch16-fearless-concurrency/listing-16-14/output.txt
@@ -22,7 +22,7 @@ 11 | let handle = thread::spawn(move || { | ^^^^^^^ note: required by a bound in `spawn` - --> /rustc/88d9e12ae178fab0fb5cc050a94da85685d449ea/library/std/src/thread/functions.rs:125:0 + --> /rustc/58cf8f9c35b355199727627d07ae34a4e2846d67/library/std/src/thread/functions.rs:125:0 For more information about this error, try `rustc --explain E0277`. error: could not compile `shared-state` (bin "shared-state") due to 1 previous error
diff --git a/listings/ch21-web-server/listing-21-22/output.txt b/listings/ch21-web-server/listing-21-22/output.txt index 748774f..a216f24 100644 --- a/listings/ch21-web-server/listing-21-22/output.txt +++ b/listings/ch21-web-server/listing-21-22/output.txt
@@ -8,8 +8,8 @@ | | | 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/88d9e12ae178fab0fb5cc050a94da85685d449ea/library/std/src/thread/join_handle.rs:149:16 +note: `std::thread::JoinHandle::<T>::join` takes ownership of the receiver `self`, which moves `worker.thread` + --> /rustc/58cf8f9c35b355199727627d07ae34a4e2846d67/library/std/src/thread/join_handle.rs:149:16 For more information about this error, try `rustc --explain E0507`. error: could not compile `hello` (lib) due to 1 previous error
diff --git a/rust-toolchain b/rust-toolchain index a6f5a59..3e99264 100644 --- a/rust-toolchain +++ b/rust-toolchain
@@ -1 +1 @@ -1.98 +1.99
diff --git a/src/title-page.md b/src/title-page.md index 005b5fa..906da96 100644 --- a/src/title-page.md +++ b/src/title-page.md
@@ -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.98.0 (released 2026-08-20) +This version of the text assumes you’re using Rust 1.99.1 (released 2026-10-15) 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