From 845c5ee48770c97ea47bfdc4584aa44eff41f16f Mon Sep 17 00:00:00 2001 From: Alisa Sireneva Date: Fri, 1 Nov 2024 17:19:28 +0300 Subject: [PATCH] Add compile_error for panic=abort --- src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index fe1dc40..dbaadb1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -23,6 +23,8 @@ //! lithium = "1" //! ``` //! +//! If you break either of these two requirements, cargo will scream at you. +//! //! //! # Platform support //! @@ -161,6 +163,9 @@ reason = "XXX: remove when strict provenance is stabilized" )] +#[cfg(panic = "abort")] +compile_error!("Using Lithium with panic = \"abort\" is unsupported"); + extern crate alloc; mod api;