-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4089 from rust-lang/rust-1.82
Update to Rust 1.82
- Loading branch information
Showing
59 changed files
with
3,743 additions
and
13,390 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 17 additions & 14 deletions
31
listings/ch06-enums-and-pattern-matching/no-listing-10-non-exhaustive-match/output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,25 @@ | ||
$ cargo run | ||
Compiling enums v0.1.0 (file:///projects/enums) | ||
error[E0004]: non-exhaustive patterns: `None` not covered | ||
--> src/main.rs:3:15 | ||
| | ||
3 | match x { | ||
| ^ pattern `None` not covered | ||
| | ||
--> src/main.rs:3:15 | ||
| | ||
3 | match x { | ||
| ^ pattern `None` not covered | ||
| | ||
note: `Option<i32>` defined here | ||
--> /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/option.rs:574:1 | ||
::: /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/option.rs:578:5 | ||
| | ||
= note: not covered | ||
= note: the matched value is of type `Option<i32>` | ||
--> file:///home/.rustup/toolchains/1.82/lib/rustlib/src/rust/library/core/src/option.rs:571:1 | ||
| | ||
571 | pub enum Option<T> { | ||
| ^^^^^^^^^^^^^^^^^^ | ||
... | ||
575 | None, | ||
| ---- not covered | ||
= note: the matched value is of type `Option<i32>` | ||
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown | ||
| | ||
4 ~ Some(i) => Some(i + 1), | ||
5 ~ None => todo!(), | ||
| | ||
| | ||
4 ~ Some(i) => Some(i + 1), | ||
5 ~ None => todo!(), | ||
| | ||
|
||
For more information about this error, try `rustc --explain E0004`. | ||
error: could not compile `enums` (bin "enums") due to 1 previous error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 26 additions & 20 deletions
46
listings/ch16-fearless-concurrency/listing-16-14/output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,34 @@ | ||
$ cargo run | ||
Compiling shared-state v0.1.0 (file:///projects/shared-state) | ||
error[E0277]: `Rc<Mutex<i32>>` cannot be sent between threads safely | ||
--> src/main.rs:11:36 | ||
| | ||
11 | let handle = thread::spawn(move || { | ||
| ------------- ^------ | ||
| | | | ||
| ______________________|_____________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(); | ||
13 | | | ||
14 | | *num += 1; | ||
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>>`, which is required by `{closure@src/main.rs:11:36: 11:43}: Send` | ||
--> src/main.rs:11:36 | ||
| | ||
11 | let handle = thread::spawn(move || { | ||
| ------------- ^------ | ||
| | | | ||
| ______________________|_____________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(); | ||
13 | | | ||
14 | | *num += 1; | ||
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>>`, which is required by `{closure@src/main.rs:11:36: 11:43}: Send` | ||
note: required because it's used within this closure | ||
--> src/main.rs:11:36 | ||
| | ||
11 | let handle = thread::spawn(move || { | ||
| ^^^^^^^ | ||
--> src/main.rs:11:36 | ||
| | ||
11 | let handle = thread::spawn(move || { | ||
| ^^^^^^^ | ||
note: required by a bound in `spawn` | ||
--> /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/thread/mod.rs:688:1 | ||
--> file:///home/.rustup/toolchains/1.82/lib/rustlib/src/rust/library/std/src/thread/mod.rs:675:8 | ||
| | ||
672 | pub fn spawn<F, T>(f: F) -> JoinHandle<T> | ||
| ----- required by a bound in this function | ||
... | ||
675 | F: Send + 'static, | ||
| ^^^^ required by this bound in `spawn` | ||
|
||
For more information about this error, try `rustc --explain E0277`. | ||
error: could not compile `shared-state` (bin "shared-state") due to 1 previous error |
Oops, something went wrong.