summaryrefslogtreecommitdiffstats
path: root/src/doc/book/listings/ch16-fearless-concurrency/listing-16-14/output.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /src/doc/book/listings/ch16-fearless-concurrency/listing-16-14/output.txt
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/doc/book/listings/ch16-fearless-concurrency/listing-16-14/output.txt')
-rw-r--r--src/doc/book/listings/ch16-fearless-concurrency/listing-16-14/output.txt21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/doc/book/listings/ch16-fearless-concurrency/listing-16-14/output.txt b/src/doc/book/listings/ch16-fearless-concurrency/listing-16-14/output.txt
new file mode 100644
index 000000000..9546e1e48
--- /dev/null
+++ b/src/doc/book/listings/ch16-fearless-concurrency/listing-16-14/output.txt
@@ -0,0 +1,21 @@
+$ 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:22
+ |
+11 | let handle = thread::spawn(move || {
+ | ______________________^^^^^^^^^^^^^_-
+ | | |
+ | | `Rc<Mutex<i32>>` cannot be sent between threads safely
+12 | | let mut num = counter.lock().unwrap();
+13 | |
+14 | | *num += 1;
+15 | | });
+ | |_________- within this `[closure@src/main.rs:11:36: 15:10]`
+ |
+ = help: within `[closure@src/main.rs:11:36: 15:10]`, the trait `Send` is not implemented for `Rc<Mutex<i32>>`
+ = note: required because it appears within the type `[closure@src/main.rs:11:36: 15:10]`
+note: required by a bound in `spawn`
+
+For more information about this error, try `rustc --explain E0277`.
+error: could not compile `shared-state` due to previous error