Last active
February 1, 2022 21:16
-
-
Save ihcsim/15c10c60470c8fde04bf05e59c5d045c 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: `s` | |
--> src/main.rs:26:9 | |
| | |
25 | let s = "some data".to_string(); | |
| - move occurs because `s` has type `String`, which does not implement the `Copy` trait | |
26 | (s, s.len()) | |
| - ^^^^^^^ value borrowed here after move | |
| | | |
| value moved here | |
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