Avoid warnings from rust-analyzer for the panic handler
Rust-analyzer runs cargo check --all-targets which also checks the test configuration where previously there would be a bunch of warnings for unused things due to the panic handler being configured out.
This commit is contained in:
+6
-1
@@ -25,7 +25,12 @@ use crate::{
|
||||
/// Required to handle panics
|
||||
#[cfg(not(test))]
|
||||
#[panic_handler]
|
||||
fn rust_begin_unwind(info: &PanicInfo) -> ! {
|
||||
fn panic_handler(info: &PanicInfo) -> ! {
|
||||
panic_handler_inner(info)
|
||||
}
|
||||
|
||||
#[cfg_attr(test, expect(dead_code))]
|
||||
fn panic_handler_inner(info: &PanicInfo) -> ! {
|
||||
println!("KERNEL PANIC: {}", info);
|
||||
|
||||
unsafe {
|
||||
|
||||
Reference in New Issue
Block a user