diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 241948e991..abc7a46c3a 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.86 -c rust-docs - rustup default 1.86 + rustup toolchain install 1.87 -c rust-docs + rustup default 1.87 - name: Install mdbook run: | mkdir bin @@ -47,8 +47,8 @@ jobs: - name: Install Rust run: | rustup set profile minimal - rustup toolchain install 1.86 -c rust-docs - rustup default 1.86 + rustup toolchain install 1.87 -c rust-docs + rustup default 1.87 - 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 937698d761..1882f03854 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/05f9846f893b09a1be1fc8560e33fc3c815cfecb/library/core/src/cmp.rs:964:8 + --> /rustc/17067e9ac6d7ecb70e50f92c1944e545188d2359/library/core/src/cmp.rs:975: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/ch04-understanding-ownership/no-listing-14-dangling-reference/output.txt b/listings/ch04-understanding-ownership/no-listing-14-dangling-reference/output.txt index 0339433f26..70e58af8b5 100644 --- a/listings/ch04-understanding-ownership/no-listing-14-dangling-reference/output.txt +++ b/listings/ch04-understanding-ownership/no-listing-14-dangling-reference/output.txt @@ -17,12 +17,5 @@ help: instead, you are more likely to want to return an owned value 5 + fn dangle() -> String { | -error[E0515]: cannot return reference to local variable `s` - --> src/main.rs:8:5 - | -8 | &s - | ^^ returns a reference to data owned by the current function - -Some errors have detailed explanations: E0106, E0515. -For more information about an error, try `rustc --explain E0106`. -error: could not compile `ownership` (bin "ownership") due to 2 previous errors +For more information about this error, try `rustc --explain E0106`. +error: could not compile `ownership` (bin "ownership") 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 59a408f8eb..3d1370ca45 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/05f9846f893b09a1be1fc8560e33fc3c815cfecb/library/core/src/option.rs:572:1 - ::: /rustc/05f9846f893b09a1be1fc8560e33fc3c815cfecb/library/core/src/option.rs:576:5 + --> /rustc/17067e9ac6d7ecb70e50f92c1944e545188d2359/library/core/src/option.rs:572:1 + ::: /rustc/17067e9ac6d7ecb70e50f92c1944e545188d2359/library/core/src/option.rs:576:5 | = note: not covered = note: the matched value is of type `Option` diff --git a/listings/ch09-error-handling/listing-09-10/output.txt b/listings/ch09-error-handling/listing-09-10/output.txt index 9e9b206fee..a8c707e40a 100644 --- a/listings/ch09-error-handling/listing-09-10/output.txt +++ b/listings/ch09-error-handling/listing-09-10/output.txt @@ -8,7 +8,6 @@ error[E0277]: the `?` operator can only be used in a function that returns `Resu 4 | let greeting_file = File::open("hello.txt")?; | ^ cannot use the `?` operator in a function that returns `()` | - = help: the trait `FromResidual>` is not implemented for `()` help: consider adding return type | 3 ~ fn main() -> Result<(), Box> { diff --git a/listings/ch15-smart-pointers/listing-15-09/output.txt b/listings/ch15-smart-pointers/listing-15-09/output.txt index a295d26284..eb4cdd12fe 100644 --- a/listings/ch15-smart-pointers/listing-15-09/output.txt +++ b/listings/ch15-smart-pointers/listing-15-09/output.txt @@ -4,7 +4,7 @@ error[E0614]: type `MyBox<{integer}>` cannot be dereferenced --> src/main.rs:14:19 | 14 | assert_eq!(5, *y); - | ^^ + | ^^ can't be dereferenced For more information about this error, try `rustc --explain E0614`. error: could not compile `deref-example` (bin "deref-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 5c3ada5591..dc56304ba0 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/05f9846f893b09a1be1fc8560e33fc3c815cfecb/library/std/src/thread/mod.rs:723:1 + --> /rustc/17067e9ac6d7ecb70e50f92c1944e545188d2359/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/ch20-advanced-features/listing-20-07/output.txt b/listings/ch20-advanced-features/listing-20-07/output.txt index a6439a6fb7..ef123ce651 100644 --- a/listings/ch20-advanced-features/listing-20-07/output.txt +++ b/listings/ch20-advanced-features/listing-20-07/output.txt @@ -1,5 +1,4 @@ $ 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/ch21-web-server/listing-21-22/output.txt b/listings/ch21-web-server/listing-21-22/output.txt index 9e2e723ead..0896bd39e9 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/05f9846f893b09a1be1fc8560e33fc3c815cfecb/library/std/src/thread/mod.rs:1886:17 + --> /rustc/17067e9ac6d7ecb70e50f92c1944e545188d2359/library/std/src/thread/mod.rs:1895: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 c8829b04b4..8a2b133839 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.86 +1.87 diff --git a/src/title-page.md b/src/title-page.md index ac9fdbdb29..7df51652e5 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.86.0 (released 2025-04-03) +This version of the text assumes you’re using Rust 1.87.0 (released 2025-05-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] for instructions on installing or