Last active
February 1, 2022 21:03
-
-
Save ihcsim/dd4681fed77ff338fda8c63b11acf09a 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]: borrow of moved value: `svc` | |
--> src/main.rs:24:28 | |
| | |
12 | let svc = Service { | |
| --- move occurs because `svc` has type `Service<'_>`, which does not implement the `Copy` trait | |
... | |
19 | let mut nginx = svc; | |
| --- value moved here | |
... | |
24 | println!("{:?}\n{:?}", svc, nginx); | |
| ^^^ value borrowed here after move | |
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