From 9a90151756cb837e6c8205187ac8861c6e49ee8b Mon Sep 17 00:00:00 2001 From: Ruidy Date: Sat, 24 Apr 2021 17:03:58 +0200 Subject: [PATCH] panic --- src/main.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index e7a11a9..d774d11 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,13 @@ -fn main() { - println!("Hello, world!"); +#![no_std] + +use core::panic::PanicInfo; + +fn main() {} +/// Function called on panic. It is a diverging function with a `never` return type. +/// +/// # Arguments +/// - `info`- contains the file and line where the panic happened and the optional panic message +#[panic_handler] +fn panic(_info: &PanicInfo) -> ! { + loop {} }