Update to Rust 1.66.1

This commit is contained in:
Carol (Nichols || Goulding) 2023-02-10 10:55:43 -05:00
parent f2a78f64b6
commit f92027c68a
No known key found for this signature in database
GPG Key ID: E907EE5A736F87D4
11 changed files with 17 additions and 13 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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>),
| ++++ +

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1 +1 @@
1.65
1.66

View File

@ -2,7 +2,7 @@
*by Steve Klabnik and Carol Nichols, with contributions from the Rust Community*
This version of the text assumes youre using Rust 1.65 (released 2022-11-03)
This version of the text assumes youre 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.