-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
71352de
commit 667e928
Showing
15 changed files
with
108 additions
and
90 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
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
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/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/option.rs:518:1 | ||
| | ||
= note: | ||
/rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/option.rs:522:5: not covered | ||
= note: the matched value is of type `Option<i32>` | ||
--> /Users/carolnichols/.rustup/toolchains/1.68-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:566:5 | ||
| | ||
562 | pub enum Option<T> { | ||
| ------------------ | ||
... | ||
566 | 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` due to 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
45 changes: 23 additions & 22 deletions
45
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,30 +1,31 @@ | ||
$ 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>>` | ||
--> 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>>` | ||
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/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/thread/mod.rs:704:8 | ||
| | ||
= note: required by this bound in `spawn` | ||
--> /Users/carolnichols/.rustup/toolchains/1.68-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/mod.rs:712:8 | ||
| | ||
712 | 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` due to previous error |
13 changes: 2 additions & 11 deletions
13
listings/ch18-patterns-and-matching/listing-18-08/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
4 changes: 2 additions & 2 deletions
4
listings/ch19-advanced-features/no-listing-02-impl-outlineprint-for-point/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
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,15 +1,18 @@ | ||
$ cargo check | ||
Checking hello v0.1.0 (file:///projects/hello) | ||
error[E0507]: cannot move out of `worker.thread` which is behind a mutable reference | ||
--> src/lib.rs:52:13 | ||
| | ||
52 | worker.thread.join().unwrap(); | ||
| ^^^^^^^^^^^^^ ------ `worker.thread` moved due to this method call | ||
| | | ||
| move occurs because `worker.thread` has type `JoinHandle<()>`, which does not implement the `Copy` trait | ||
| | ||
note: this function takes ownership of the receiver `self`, which moves `worker.thread` | ||
--> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/thread/mod.rs:1581:17 | ||
--> src/lib.rs:52:13 | ||
| | ||
52 | worker.thread.join().unwrap(); | ||
| ^^^^^^^^^^^^^ ------ `worker.thread` moved due to this method call | ||
| | | ||
| 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` | ||
--> /Users/carolnichols/.rustup/toolchains/1.68-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/mod.rs:1589:17 | ||
| | ||
1589 | pub fn join(self) -> Result<T> { | ||
| ^^^^ | ||
|
||
For more information about this error, try `rustc --explain E0507`. | ||
error: could not compile `hello` due to previous error |
21 changes: 12 additions & 9 deletions
21
listings/ch20-web-server/no-listing-04-update-worker-definition/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
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 +1 @@ | ||
1.67 | ||
1.68 |
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