-
-
-
-
-
-
-
@@ -634,9 +604,7 @@
-
-
-
+
@@ -807,13 +775,11 @@
-
-
-
+
-
-
+
+
@@ -835,5 +801,12 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/advanced_types/Cargo.toml b/advanced_types/Cargo.toml
new file mode 100644
index 0000000..d2a1ff9
--- /dev/null
+++ b/advanced_types/Cargo.toml
@@ -0,0 +1,7 @@
+[package]
+name = "advanced_types"
+version = "0.1.0"
+authors = ["Timothy Warren "]
+edition = "2018"
+
+[dependencies]
diff --git a/advanced_types/src/main.rs b/advanced_types/src/main.rs
new file mode 100644
index 0000000..3dcc829
--- /dev/null
+++ b/advanced_types/src/main.rs
@@ -0,0 +1,16 @@
+// Type alias, just gives a new name to the existing type.
+// Considered the same type, even using the new name
+type Kilometers = i32;
+
+// A type alias is much more useful for a long, complex type
+type Thunk = Box;
+
+fn main() {
+ let x: i32 = 5;
+ let y: Kilometers = 5;
+
+ println!("x + y = {}", x + y);
+
+ let f: Thunk = Box::new(|| println!("hi"));
+ f();
+}