Skip to content

Instantly share code, notes, and snippets.

@ihcsim
Last active February 2, 2022 05:03
Show Gist options
  • Save ihcsim/55786ab254b6e5a7ef464b5c9a41d928 to your computer and use it in GitHub Desktop.
Save ihcsim/55786ab254b6e5a7ef464b5c9a41d928 to your computer and use it in GitHub Desktop.
$ 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