mirror of
https://github.com/KaiserY/trpl-zh-cn
synced 2024-11-14 21:11:31 +08:00
14 lines
633 B
Plaintext
Executable File
14 lines
633 B
Plaintext
Executable File
$ cargo check
|
|
Checking hello v0.1.0 (file:///projects/hello)
|
|
error[E0382]: use of moved value: `receiver`
|
|
--> src/lib.rs:27:42
|
|
|
|
|
22 | let (sender, receiver) = mpsc::channel();
|
|
| -------- move occurs because `receiver` has type `std::sync::mpsc::Receiver<Job>`, which does not implement the `Copy` trait
|
|
...
|
|
27 | workers.push(Worker::new(id, receiver));
|
|
| ^^^^^^^^ value moved here, in previous iteration of loop
|
|
|
|
For more information about this error, try `rustc --explain E0382`.
|
|
error: could not compile `hello` due to previous error
|