Update docs of `panic_handler`

reviewable/pr1229/r6
Thomas Eizinger 3 weeks ago
parent 9f09dc41f9
commit da34fc2689
No known key found for this signature in database
GPG Key ID: 05633CD77196CAF3

@ -136,6 +136,10 @@ pub fn check_bounds_signed(value: i64, lower: i64, upper: i64) -> bool {
#[macro_export] #[macro_export]
macro_rules! prelude { macro_rules! prelude {
() => { () => {
/// Defines our panic handler when compiling for eBPF.
///
/// eBPF programs are not allowed to panic, meaning this handler won't actually ever be called.
/// Because we compile with `no_std`, we need to define one.
#[cfg(target_arch = "bpf")] #[cfg(target_arch = "bpf")]
#[panic_handler] #[panic_handler]
fn panic(_info: &core::panic::PanicInfo) -> ! { fn panic(_info: &core::panic::PanicInfo) -> ! {

Loading…
Cancel
Save