Last active
February 2, 2022 05:03
-
-
Save ihcsim/55786ab254b6e5a7ef464b5c9a41d928 to your computer and use it in GitHub Desktop.
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
$ cargo run | |
Compiling rust-ownership v0.1.0 (/home/isim/rust-ownership) | |
error[E0382]: use of moved value: `signal` | |
--> src/main.rs:4:14 | |
| | |
2 | let signal = "kill".to_string(); | |
| ------ move occurs because `signal` has type `String`, which does not implement the `Copy` trait | |
3 | loop { | |
4 | exit(signal) | |
| ^^^^^^ value moved here, in previous iteration of loop | |
For more information about this error, try `rustc --explain E0382`. | |
error: could not compile `rust-ownership` due to previous error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment