From ae7aab81aac45849229f3d18a3ae2d94523d73e2 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sat, 1 Feb 2025 13:25:53 +0100 Subject: [PATCH] Add a demonstration of a panic --- panic/Cargo.lock | 7 +++++++ panic/Cargo.toml | 9 +++++++++ panic/src/main.rs | 3 +++ 3 files changed, 19 insertions(+) create mode 100644 panic/Cargo.lock create mode 100644 panic/Cargo.toml create mode 100644 panic/src/main.rs diff --git a/panic/Cargo.lock b/panic/Cargo.lock new file mode 100644 index 0000000..1d0f6fd --- /dev/null +++ b/panic/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "panic" +version = "0.1.0" diff --git a/panic/Cargo.toml b/panic/Cargo.toml new file mode 100644 index 0000000..c899942 --- /dev/null +++ b/panic/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "panic" +version = "0.1.0" +edition = "2021" + +[dependencies] + +[profile.release] +panic = 'abort' diff --git a/panic/src/main.rs b/panic/src/main.rs new file mode 100644 index 0000000..32a4c24 --- /dev/null +++ b/panic/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + panic!("crash and burn"); +}