diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d4dcbbf715..241948e991 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,8 +12,8 @@ jobs: - name: Install Rust run: | rustup set profile minimal - rustup toolchain install 1.85 -c rust-docs - rustup default 1.85 + rustup toolchain install 1.86 -c rust-docs + rustup default 1.86 - name: Install mdbook run: | mkdir bin @@ -47,8 +47,8 @@ jobs: - name: Install Rust run: | rustup set profile minimal - rustup toolchain install 1.85 -c rust-docs - rustup default 1.85 + rustup toolchain install 1.86 -c rust-docs + rustup default 1.86 - 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 ca5e05882f..937698d761 100644 --- a/listings/ch02-guessing-game-tutorial/listing-02-04/output.txt +++ b/listings/ch02-guessing-game-tutorial/listing-02-04/output.txt @@ -18,7 +18,7 @@ error[E0308]: mismatched types = note: expected reference `&String` found reference `&{integer}` note: method defined here - --> /rustc/4eb161250e340c8f48f66e2b929ef4a5bed7c181/library/core/src/cmp.rs:964:8 + --> /rustc/05f9846f893b09a1be1fc8560e33fc3c815cfecb/library/core/src/cmp.rs:964: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 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 e8b76379db..59a408f8eb 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 @@ error[E0004]: non-exhaustive patterns: `None` not covered | ^ pattern `None` not covered | note: `Option` defined here - --> /rustc/4eb161250e340c8f48f66e2b929ef4a5bed7c181/library/core/src/option.rs:572:1 - ::: /rustc/4eb161250e340c8f48f66e2b929ef4a5bed7c181/library/core/src/option.rs:576:5 + --> /rustc/05f9846f893b09a1be1fc8560e33fc3c815cfecb/library/core/src/option.rs:572:1 + ::: /rustc/05f9846f893b09a1be1fc8560e33fc3c815cfecb/library/core/src/option.rs:576:5 | = note: not covered = note: the matched value is of type `Option` diff --git a/listings/ch07-managing-growing-projects/listing-07-12/output.txt b/listings/ch07-managing-growing-projects/listing-07-12/output.txt index 0eda253125..e094fc8d03 100644 --- a/listings/ch07-managing-growing-projects/listing-07-12/output.txt +++ b/listings/ch07-managing-growing-projects/listing-07-12/output.txt @@ -1,11 +1,12 @@ $ cargo build Compiling restaurant v0.1.0 (file:///projects/restaurant) -error[E0433]: failed to resolve: use of undeclared crate or module `hosting` +error[E0433]: failed to resolve: use of unresolved module or unlinked crate `hosting` --> src/lib.rs:11:9 | 11 | hosting::add_to_waitlist(); - | ^^^^^^^ use of undeclared crate or module `hosting` + | ^^^^^^^ use of unresolved module or unlinked crate `hosting` | + = help: if you wanted to use a crate named `hosting`, use `cargo add hosting` to add it to your `Cargo.toml` help: consider importing this module through its public re-export | 10 + use crate::hosting; diff --git a/listings/ch15-smart-pointers/listing-15-15/output.txt b/listings/ch15-smart-pointers/listing-15-15/output.txt index 8a53b28520..d7811605c5 100644 --- a/listings/ch15-smart-pointers/listing-15-15/output.txt +++ b/listings/ch15-smart-pointers/listing-15-15/output.txt @@ -8,8 +8,9 @@ error[E0040]: explicit use of destructor method | help: consider using `drop` function | -16 | drop(c); - | +++++ ~ +16 - c.drop(); +16 + drop(c); + | For more information about this error, try `rustc --explain E0040`. error: could not compile `drop-example` (bin "drop-example") due to 1 previous error diff --git a/listings/ch16-fearless-concurrency/listing-16-14/output.txt b/listings/ch16-fearless-concurrency/listing-16-14/output.txt index 131fbed5b7..5c3ada5591 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 @@ note: required because it's used within this closure 11 | let handle = thread::spawn(move || { | ^^^^^^^ note: required by a bound in `spawn` - --> /rustc/4eb161250e340c8f48f66e2b929ef4a5bed7c181/library/std/src/thread/mod.rs:728:1 + --> /rustc/05f9846f893b09a1be1fc8560e33fc3c815cfecb/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 diff --git a/listings/ch17-async-await/listing-17-23/src/main.rs b/listings/ch17-async-await/listing-17-23/src/main.rs index 8f7b93ce20..13a9ef9e20 100644 --- a/listings/ch17-async-await/listing-17-23/src/main.rs +++ b/listings/ch17-async-await/listing-17-23/src/main.rs @@ -42,7 +42,7 @@ fn main() { tx.send(val).unwrap(); trpl::sleep(Duration::from_secs(1)).await; } - // ANCHOR: here + // ANCHOR: here }; let futures: Vec>> = diff --git a/listings/ch20-advanced-features/listing-20-07/output.txt b/listings/ch20-advanced-features/listing-20-07/output.txt index ef123ce651..a6439a6fb7 100644 --- a/listings/ch20-advanced-features/listing-20-07/output.txt +++ b/listings/ch20-advanced-features/listing-20-07/output.txt @@ -1,4 +1,5 @@ $ cargo +nightly miri run +Preparing a sysroot for Miri (target: aarch64-apple-darwin)... done Compiling unsafe-example v0.1.0 (file:///projects/unsafe-example) Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.01s Running `file:///home/.rustup/toolchains/nightly/bin/cargo-miri runner target/miri/debug/unsafe-example` diff --git a/listings/ch20-advanced-features/listing-20-33/output.txt b/listings/ch20-advanced-features/listing-20-33/output.txt index 2825c07c7b..acef331119 100644 --- a/listings/ch20-advanced-features/listing-20-33/output.txt +++ b/listings/ch20-advanced-features/listing-20-33/output.txt @@ -12,8 +12,8 @@ error[E0308]: mismatched types 13 | fn returns_initialized_closure(init: i32) -> impl Fn(i32) -> i32 { | ------------------- the found opaque type | - = note: expected opaque type `impl Fn(i32) -> i32` (opaque type at ) - found opaque type `impl Fn(i32) -> i32` (opaque type at ) + = note: expected opaque type `impl Fn(i32) -> i32` + found opaque type `impl Fn(i32) -> i32` = note: distinct uses of `impl Trait` result in different opaque types For more information about this error, try `rustc --explain E0308`. diff --git a/listings/ch21-web-server/listing-21-22/output.txt b/listings/ch21-web-server/listing-21-22/output.txt index 0634b6632f..9e2e723ead 100644 --- a/listings/ch21-web-server/listing-21-22/output.txt +++ b/listings/ch21-web-server/listing-21-22/output.txt @@ -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::::join` takes ownership of the receiver `self`, which moves `worker.thread` - --> /rustc/4eb161250e340c8f48f66e2b929ef4a5bed7c181/library/std/src/thread/mod.rs:1876:17 + --> /rustc/05f9846f893b09a1be1fc8560e33fc3c815cfecb/library/std/src/thread/mod.rs:1886:17 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 c4f7465a91..c8829b04b4 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.85 +1.86 diff --git a/src/title-page.md b/src/title-page.md index 63bd2da89e..ac9fdbdb29 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.85.0 (released 2025-02-17) +This version of the text assumes you’re using Rust 1.86.0 (released 2025-04-03) 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] for instructions on installing or