Skip to content

Instantly share code, notes, and snippets.

@ihcsim
Last active January 31, 2022 23:35
Show Gist options
  • Save ihcsim/480323ad928612dcabecf8df77493128 to your computer and use it in GitHub Desktop.
Save ihcsim/480323ad928612dcabecf8df77493128 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 partially moved value: `svc1`
--> src/main.rs:18:28
|
15 | namespace: svc1.namespace,
| -------------- value partially moved here
...
18 | println!("{:?}\n{:?}", svc1, svc2);
| ^^^^ value borrowed here after partial move
|
= note: partial move occurs because `svc1.namespace` has type `String`, which does not implement the `Copy` trait
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