Last active
January 31, 2022 23:07
-
-
Save ihcsim/15f49c3ac04d722d4ff9882dac6d943a 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[E0505]: cannot move out of `str` because it is borrowed | |
--> src/main.rs:3:62 | |
| | |
3 | println!("original: {}\nupdated: {}", str, append_suffix(str)); | |
| ---------------------------------------------------------^^^-- | |
| | | | | |
| | | move out of `str` occurs here | |
| | borrow of `str` occurs here | |
| borrow later used here | |
For more information about this error, try `rustc --explain E0505`. | |
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