Skip to content

Commit

Permalink
Update to Rust 1.66.1
Browse files Browse the repository at this point in the history
  • Loading branch information
carols10cents committed Feb 10, 2023
1 parent f2a78f6 commit f92027c
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
- name: Install Rust
run: |
rustup set profile minimal
rustup toolchain install 1.65 -c rust-docs
rustup default 1.65
rustup toolchain install 1.66 -c rust-docs
rustup default 1.66
- name: Install mdbook
run: |
mkdir bin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ warning: unused `Result` that must be used
10 | io::stdin().read_line(&mut guess);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_must_use)]` on by default
= note: this `Result` may be an `Err` variant, which should be handled
= note: `#[warn(unused_must_use)]` on by default

warning: `guessing_game` (bin "guessing_game") generated 1 warning
Finished dev [unoptimized + debuginfo] target(s) in 0.59s
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ error[E0308]: mismatched types
| |
| implicitly returns `()` as its body has no tail or `return` expression
8 | x + 1;
| - help: remove this semicolon
| - help: remove this semicolon to return this value

For more information about this error, try `rustc --explain E0308`.
error: could not compile `functions` due to previous error
2 changes: 1 addition & 1 deletion listings/ch12-an-io-project/listing-12-12/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ warning: unused `Result` that must be used
19 | run(config);
| ^^^^^^^^^^^^
|
= note: `#[warn(unused_must_use)]` on by default
= note: this `Result` may be an `Err` variant, which should be handled
= note: `#[warn(unused_must_use)]` on by default

warning: `minigrep` (bin "minigrep") generated 1 warning
Finished dev [unoptimized + debuginfo] target(s) in 0.71s
Expand Down
2 changes: 1 addition & 1 deletion listings/ch13-functional-features/listing-13-14/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ warning: unused `Map` that must be used
4 | v1.iter().map(|x| x + 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_must_use)]` on by default
= note: iterators are lazy and do nothing unless consumed
= note: `#[warn(unused_must_use)]` on by default

warning: `iterators` (bin "iterators") generated 1 warning
Finished dev [unoptimized + debuginfo] target(s) in 0.47s
Expand Down
4 changes: 2 additions & 2 deletions listings/ch15-smart-pointers/listing-15-03/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ error[E0072]: recursive type `List` has infinite size
--> src/main.rs:1:1
|
1 | enum List {
| ^^^^^^^^^ recursive type has infinite size
| ^^^^^^^^^
2 | Cons(i32, List),
| ---- recursive without indirection
|
help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `List` representable
help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
|
2 | Cons(i32, Box<List>),
| ++++ +
Expand Down
4 changes: 4 additions & 0 deletions listings/ch18-patterns-and-matching/listing-18-08/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ help: you might want to use `if let` to ignore the variant that isn't matched
|
3 | let x = if let Some(x) = some_option_value { x } else { todo!() };
| ++++++++++ ++++++++++++++++++++++
help: alternatively, you might want to use let else to handle the variant that isn't matched
|
3 | let Some(x) = some_option_value else { todo!() };
| ++++++++++++++++

For more information about this error, try `rustc --explain E0005`.
error: could not compile `patterns` due to previous error
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ warning: irrefutable `if let` pattern
2 | if let x = 5 {
| ^^^^^^^^^
|
= note: `#[warn(irrefutable_let_patterns)]` on by default
= note: this pattern will always match, so the `if let` is useless
= help: consider replacing the `if let` with a `let`
= note: `#[warn(irrefutable_let_patterns)]` on by default

warning: `patterns` (bin "patterns") generated 1 warning
Finished dev [unoptimized + debuginfo] target(s) in 0.39s
Expand Down
4 changes: 2 additions & 2 deletions listings/ch19-advanced-features/listing-19-20/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ error[E0790]: cannot call associated function on trait without specifying the co
|
help: use the fully-qualified path to the only available implementation
|
20 | println!("A baby dog is called a {}", <::Dog as Animal>::baby_name());
| +++++++++ +
20 | println!("A baby dog is called a {}", <Dog as Animal>::baby_name());
| +++++++ +

For more information about this error, try `rustc --explain E0790`.
error: could not compile `traits-example` due to previous error
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.65
1.66
2 changes: 1 addition & 1 deletion src/title-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.65 (released 2022-11-03)
This version of the text assumes you’re using Rust 1.66.1 (released 2023-01-10)
or later. See the [“Installation” section of Chapter 1][install]<!-- ignore -->
to install or update Rust.

Expand Down

0 comments on commit f92027c

Please sign in to comment.