summaryrefslogtreecommitdiffstats
path: root/src/doc/book/listings/ch04-understanding-ownership/listing-04-02
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc/book/listings/ch04-understanding-ownership/listing-04-02')
-rw-r--r--src/doc/book/listings/ch04-understanding-ownership/listing-04-02/Cargo.lock6
-rw-r--r--src/doc/book/listings/ch04-understanding-ownership/listing-04-02/Cargo.toml6
-rw-r--r--src/doc/book/listings/ch04-understanding-ownership/listing-04-02/src/main.rs6
3 files changed, 18 insertions, 0 deletions
diff --git a/src/doc/book/listings/ch04-understanding-ownership/listing-04-02/Cargo.lock b/src/doc/book/listings/ch04-understanding-ownership/listing-04-02/Cargo.lock
new file mode 100644
index 000000000..2aa4918e5
--- /dev/null
+++ b/src/doc/book/listings/ch04-understanding-ownership/listing-04-02/Cargo.lock
@@ -0,0 +1,6 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+[[package]]
+name = "ownership"
+version = "0.1.0"
+
diff --git a/src/doc/book/listings/ch04-understanding-ownership/listing-04-02/Cargo.toml b/src/doc/book/listings/ch04-understanding-ownership/listing-04-02/Cargo.toml
new file mode 100644
index 000000000..e8847526d
--- /dev/null
+++ b/src/doc/book/listings/ch04-understanding-ownership/listing-04-02/Cargo.toml
@@ -0,0 +1,6 @@
+[package]
+name = "ownership"
+version = "0.1.0"
+edition = "2021"
+
+[dependencies]
diff --git a/src/doc/book/listings/ch04-understanding-ownership/listing-04-02/src/main.rs b/src/doc/book/listings/ch04-understanding-ownership/listing-04-02/src/main.rs
new file mode 100644
index 000000000..de0f1b325
--- /dev/null
+++ b/src/doc/book/listings/ch04-understanding-ownership/listing-04-02/src/main.rs
@@ -0,0 +1,6 @@
+fn main() {
+ // ANCHOR: here
+ let x = 5;
+ let y = x;
+ // ANCHOR_END: here
+}