diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5f3638cc3d..2b8b5245a7 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.68 -c rust-docs - rustup default 1.68 + rustup toolchain install 1.69 -c rust-docs + rustup default 1.69 - name: Install mdbook run: | mkdir bin 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 d784a3dcaf..e64436dd75 100644 --- a/listings/ch02-guessing-game-tutorial/listing-02-04/output.txt +++ b/listings/ch02-guessing-game-tutorial/listing-02-04/output.txt @@ -11,16 +11,16 @@ error[E0308]: mismatched types --> src/main.rs:22:21 | 22 | match guess.cmp(&secret_number) { - | --- ^^^^^^^^^^^^^^ expected struct `String`, found integer + | --- ^^^^^^^^^^^^^^ expected `&String`, found `&{integer}` | | | arguments to this method are incorrect | = note: expected reference `&String` found reference `&{integer}` -note: associated function defined here - --> /Users/carolnichols/.rustup/toolchains/1.68-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/cmp.rs:781:8 +note: method defined here + --> /Users/carolnichols/.rustup/toolchains/1.69-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/cmp.rs:783:8 | -781 | fn cmp(&self, other: &Self) -> Ordering; +783 | fn cmp(&self, other: &Self) -> Ordering; | ^^^ For more information about this error, try `rustc --explain E0308`. 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 a0a046ec6a..11eff13f67 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,12 +7,12 @@ error[E0004]: non-exhaustive patterns: `None` not covered | ^ pattern `None` not covered | note: `Option` defined here - --> /Users/carolnichols/.rustup/toolchains/1.68-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:566:5 + --> /Users/carolnichols/.rustup/toolchains/1.69-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:567:5 | -562 | pub enum Option { +563 | pub enum Option { | ------------------ ... -566 | None, +567 | None, | ^^^^ not covered = note: the matched value is of type `Option` help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown diff --git a/listings/ch10-generic-types-traits-and-lifetimes/listing-10-16/output.txt b/listings/ch10-generic-types-traits-and-lifetimes/listing-10-16/output.txt index ad73272099..55a0ce5d38 100644 --- a/listings/ch10-generic-types-traits-and-lifetimes/listing-10-16/output.txt +++ b/listings/ch10-generic-types-traits-and-lifetimes/listing-10-16/output.txt @@ -3,6 +3,8 @@ $ cargo run error[E0597]: `x` does not live long enough --> src/main.rs:6:13 | +5 | let x = 5; + | - binding `x` declared here 6 | r = &x; | ^^ borrowed value does not live long enough 7 | } diff --git a/listings/ch10-generic-types-traits-and-lifetimes/listing-10-23/output.txt b/listings/ch10-generic-types-traits-and-lifetimes/listing-10-23/output.txt index 7f31ce02c4..0b1621e832 100644 --- a/listings/ch10-generic-types-traits-and-lifetimes/listing-10-23/output.txt +++ b/listings/ch10-generic-types-traits-and-lifetimes/listing-10-23/output.txt @@ -3,6 +3,8 @@ $ cargo run error[E0597]: `string2` does not live long enough --> src/main.rs:6:44 | +5 | let string2 = String::from("xyz"); + | ------- binding `string2` declared here 6 | result = longest(string1.as_str(), string2.as_str()); | ^^^^^^^^^^^^^^^^ borrowed value does not live long enough 7 | } diff --git a/listings/ch13-functional-features/listing-13-03/output.txt b/listings/ch13-functional-features/listing-13-03/output.txt index 68838deff0..fa2e06971b 100644 --- a/listings/ch13-functional-features/listing-13-03/output.txt +++ b/listings/ch13-functional-features/listing-13-03/output.txt @@ -6,7 +6,7 @@ error[E0308]: mismatched types 5 | let n = example_closure(5); | --------------- ^- help: try using a conversion method: `.to_string()` | | | - | | expected struct `String`, found integer + | | expected `String`, found integer | arguments to this function are incorrect | note: closure parameter defined here diff --git a/listings/ch16-fearless-concurrency/listing-16-14/output.txt b/listings/ch16-fearless-concurrency/listing-16-14/output.txt index 93e6bd322b..15942b400e 100644 --- a/listings/ch16-fearless-concurrency/listing-16-14/output.txt +++ b/listings/ch16-fearless-concurrency/listing-16-14/output.txt @@ -22,9 +22,9 @@ note: required because it's used within this closure 11 | let handle = thread::spawn(move || { | ^^^^^^^ note: required by a bound in `spawn` - --> /Users/carolnichols/.rustup/toolchains/1.68-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/mod.rs:712:8 + --> /Users/carolnichols/.rustup/toolchains/1.69-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/mod.rs:714:8 | -712 | F: Send + 'static, +714 | F: Send + 'static, | ^^^^ required by this bound in `spawn` For more information about this error, try `rustc --explain E0277`. diff --git a/listings/ch20-web-server/listing-20-22/output.txt b/listings/ch20-web-server/listing-20-22/output.txt index 99b6ef62a8..5f7f30e925 100644 --- a/listings/ch20-web-server/listing-20-22/output.txt +++ b/listings/ch20-web-server/listing-20-22/output.txt @@ -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::::join` takes ownership of the receiver `self`, which moves `worker.thread` - --> /Users/carolnichols/.rustup/toolchains/1.68-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/mod.rs:1589:17 + --> /Users/carolnichols/.rustup/toolchains/1.69-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/mod.rs:1591:17 | -1589 | pub fn join(self) -> Result { +1591 | pub fn join(self) -> Result { | ^^^^ For more information about this error, try `rustc --explain E0507`. diff --git a/listings/ch20-web-server/no-listing-02-impl-threadpool-new/output.txt b/listings/ch20-web-server/no-listing-02-impl-threadpool-new/output.txt index 44c8f3953b..593cbffcb1 100644 --- a/listings/ch20-web-server/no-listing-02-impl-threadpool-new/output.txt +++ b/listings/ch20-web-server/no-listing-02-impl-threadpool-new/output.txt @@ -4,7 +4,7 @@ error[E0599]: no method named `execute` found for struct `ThreadPool` in the cur --> src/main.rs:17:14 | 17 | pool.execute(|| { - | ^^^^^^^ method not found in `ThreadPool` + | -----^^^^^^^ method not found in `ThreadPool` For more information about this error, try `rustc --explain E0599`. error: could not compile `hello` due to previous error diff --git a/listings/ch20-web-server/no-listing-04-update-worker-definition/output.txt b/listings/ch20-web-server/no-listing-04-update-worker-definition/output.txt index 6e0132e0a8..590ba1d728 100644 --- a/listings/ch20-web-server/no-listing-04-update-worker-definition/output.txt +++ b/listings/ch20-web-server/no-listing-04-update-worker-definition/output.txt @@ -7,9 +7,9 @@ error[E0599]: no method named `join` found for enum `Option` in the current scop | ^^^^ method not found in `Option>` | note: the method `join` exists on the type `JoinHandle<()>` - --> /Users/carolnichols/.rustup/toolchains/1.68-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/mod.rs:1589:5 + --> /Users/carolnichols/.rustup/toolchains/1.69-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/mod.rs:1591:5 | -1589 | pub fn join(self) -> Result { +1591 | pub fn join(self) -> Result { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `Option::expect` to unwrap the `JoinHandle<()>` value, panicking if the value is an `Option::None` | @@ -20,7 +20,7 @@ error[E0308]: mismatched types --> src/lib.rs:72:22 | 72 | Worker { id, thread } - | ^^^^^^ expected enum `Option`, found struct `JoinHandle` + | ^^^^^^ expected `Option>`, found `JoinHandle<_>` | = note: expected enum `Option>` found struct `JoinHandle<_>` diff --git a/rust-toolchain b/rust-toolchain index 083b97b96a..883d7d6539 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.68 +1.69 diff --git a/src/title-page.md b/src/title-page.md index 2f1c72d966..4edbdf0d9e 100644 --- a/src/title-page.md +++ b/src/title-page.md @@ -2,7 +2,7 @@ *by Steve Klabnik and Carol Nichols, with contributions from the Rust Community* -This version of the text assumes you’re using Rust 1.68.2 (released 2023-03-28) +This version of the text assumes you’re using Rust 1.69.0 (released 2023-04-20) or later. See the [“Installation” section of Chapter 1][install] to install or update Rust.