Update to Rust 1.74

This commit is contained in:
Carol (Nichols || Goulding) 2024-02-19 13:28:36 -05:00 committed by Carol (Nichols || Goulding)
parent e51e1e4457
commit 551369f4b1
10 changed files with 20 additions and 33 deletions

View File

@ -12,8 +12,8 @@ jobs:
- name: Install Rust
run: |
rustup set profile minimal
rustup toolchain install 1.73 -c rust-docs
rustup default 1.73
rustup toolchain install 1.74 -c rust-docs
rustup default 1.74
- name: Install mdbook
run: |
mkdir bin

View File

@ -18,7 +18,7 @@ error[E0308]: mismatched types
= note: expected reference `&String`
found reference `&{integer}`
note: method defined here
--> /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/cmp.rs:775:8
--> /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/cmp.rs:793:8
For more information about this error, try `rustc --explain E0308`.
error: could not compile `guessing_game` (bin "guessing_game") due to previous error

View File

@ -5,22 +5,8 @@ error: expected expression, found `let` statement
|
2 | let x = (let y = 6);
| ^^^
error: expected expression, found statement (`let`)
--> src/main.rs:2:14
|
2 | let x = (let y = 6);
| ^^^^^^^^^
|
= note: variable declaration using `let` is a statement
error[E0658]: `let` expressions in this position are unstable
--> src/main.rs:2:14
|
2 | let x = (let y = 6);
| ^^^^^^^^^
|
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
= note: only supported directly in conditions of `if` and `while` expressions
warning: unnecessary parentheses around assigned value
--> src/main.rs:2:13
@ -35,6 +21,5 @@ help: remove these parentheses
2 + let x = let y = 6;
|
For more information about this error, try `rustc --explain E0658`.
warning: `functions` (bin "functions") generated 1 warning
error: could not compile `functions` (bin "functions") due to 3 previous errors; 1 warning emitted
error: could not compile `functions` (bin "functions") due to previous error; 1 warning emitted

View File

@ -7,8 +7,8 @@ error[E0004]: non-exhaustive patterns: `None` not covered
| ^ pattern `None` not covered
|
note: `Option<i32>` defined here
--> /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/option.rs:563:1
::: /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/option.rs:567:5
--> /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/option.rs:563:1
::: /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/option.rs:567:5
|
= note: not covered
= note: the matched value is of type `Option<i32>`

View File

@ -4,10 +4,12 @@ error[E0040]: explicit use of destructor method
--> src/main.rs:16:7
|
16 | c.drop();
| --^^^^--
| | |
| | explicit destructor calls not allowed
| help: consider using `drop` function: `drop(c)`
| ^^^^ explicit destructor calls not allowed
|
help: consider using `drop` function
|
16 | drop(c);
| +++++ ~
For more information about this error, try `rustc --explain E0040`.
error: could not compile `drop-example` (bin "drop-example") due to previous error

View File

@ -6,7 +6,7 @@ error[E0277]: `Rc<Mutex<i32>>` cannot be sent between threads safely
11 | let handle = thread::spawn(move || {
| ------------- ^------
| | |
| ______________________|_____________within this `[closure@src/main.rs:11:36: 11:43]`
| ______________________|_____________within this `{closure@src/main.rs:11:36: 11:43}`
| | |
| | required by a bound introduced by this call
12 | | let mut num = counter.lock().unwrap();
@ -15,14 +15,14 @@ error[E0277]: `Rc<Mutex<i32>>` cannot be sent between threads safely
15 | | });
| |_________^ `Rc<Mutex<i32>>` cannot be sent between threads safely
|
= help: within `[closure@src/main.rs:11:36: 11:43]`, the trait `Send` is not implemented for `Rc<Mutex<i32>>`
= help: within `{closure@src/main.rs:11:36: 11:43}`, the trait `Send` is not implemented for `Rc<Mutex<i32>>`
note: required because it's used within this closure
--> src/main.rs:11:36
|
11 | let handle = thread::spawn(move || {
| ^^^^^^^
note: required by a bound in `spawn`
--> /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:680:1
--> /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/thread/mod.rs:680:1
For more information about this error, try `rustc --explain E0277`.
error: could not compile `shared-state` (bin "shared-state") due to previous error

View File

@ -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::<T>::join` takes ownership of the receiver `self`, which moves `worker.thread`
--> /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:1570:17
--> /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/thread/mod.rs:1650:17
For more information about this error, try `rustc --explain E0507`.
error: could not compile `hello` (lib) due to previous error

View File

@ -7,7 +7,7 @@ error[E0599]: no method named `join` found for enum `Option` in the current scop
| ^^^^ method not found in `Option<JoinHandle<()>>`
|
note: the method `join` exists on the type `JoinHandle<()>`
--> /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:1570:5
--> /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/thread/mod.rs:1650:5
help: consider using `Option::expect` to unwrap the `JoinHandle<()>` value, panicking if the value is an `Option::None`
|
52 | worker.thread.expect("REASON").join().unwrap();

View File

@ -1 +1 @@
1.73
1.74

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.73.0 (released 2023-10-05)
This version of the text assumes youre using Rust 1.74.1 (released 2023-12-07)
or later. See the [“Installation” section of Chapter 1][install]<!-- ignore -->
to install or update Rust.