diff options
Diffstat (limited to 'src/doc/book/listings/ch04-understanding-ownership/no-listing-03-string-move/src/main.rs')
-rw-r--r-- | src/doc/book/listings/ch04-understanding-ownership/no-listing-03-string-move/src/main.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/doc/book/listings/ch04-understanding-ownership/no-listing-03-string-move/src/main.rs b/src/doc/book/listings/ch04-understanding-ownership/no-listing-03-string-move/src/main.rs new file mode 100644 index 000000000..a5817e714 --- /dev/null +++ b/src/doc/book/listings/ch04-understanding-ownership/no-listing-03-string-move/src/main.rs @@ -0,0 +1,6 @@ +fn main() { + // ANCHOR: here + let s1 = String::from("hello"); + let s2 = s1; + // ANCHOR_END: here +} |