summaryrefslogtreecommitdiff
path: root/rust/theBook/chapter-9-error-handling/panic/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/theBook/chapter-9-error-handling/panic/src/main.rs')
-rw-r--r--rust/theBook/chapter-9-error-handling/panic/src/main.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/rust/theBook/chapter-9-error-handling/panic/src/main.rs b/rust/theBook/chapter-9-error-handling/panic/src/main.rs
new file mode 100644
index 0000000..a3bc2a7
--- /dev/null
+++ b/rust/theBook/chapter-9-error-handling/panic/src/main.rs
@@ -0,0 +1,5 @@
+fn main() {
+ let x = vec![1,2,3];
+
+ x[99];
+}