#![no_std]
#![cfg_attr(
not(test),
deny(
clippy::indexing_slicing,
clippy::unwrap_used,
clippy::expect_used,
clippy::panic,
clippy::exhaustive_structs,
clippy::exhaustive_enums,
clippy::trivially_copy_pass_by_ref,
missing_debug_implementations,
)
)]
#![allow(clippy::upper_case_acronyms)]
#![cfg_attr(
all(target_os = "none", needs_alloc_error_handler),
feature(alloc_error_handler)
)]
extern crate icu_capi;
#[cfg(target_os = "none")]
mod stuff {
extern crate alloc;
use core::panic::PanicInfo;
use freertos_rust::FreeRtosAllocator;
#[global_allocator]
static GLOBAL: FreeRtosAllocator = FreeRtosAllocator;
#[cfg(needs_alloc_error_handler)] #[alloc_error_handler]
fn alloc_error(_layout: alloc::alloc::Layout) -> ! {
cortex_m::asm::bkpt();
loop {}
}
#[panic_handler]
fn panic(_info: &PanicInfo) -> ! {
loop {}
}
}
#[cfg(not(target_os = "none"))]
extern crate std as rust_std;