Skip to content

Instantly share code, notes, and snippets.

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