mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-17 06:47:49 +00:00
Pub and no_mangle are no longer required for panic_handler (#468)
This commit is contained in:
committed by
GitHub
parent
2dd925d34d
commit
6f48a17ba4
@@ -28,7 +28,7 @@ Unfortunately it's a bit more complicated for `no_std` applications such as our
|
||||
error[E0152]: duplicate lang item found: `panic_impl`.
|
||||
--> src/main.rs:35:1
|
||||
|
|
||||
35 | / pub fn panic(info: &PanicInfo) -> ! {
|
||||
35 | / fn panic(info: &PanicInfo) -> ! {
|
||||
36 | | println!("{}", info);
|
||||
37 | | loop {}
|
||||
38 | | }
|
||||
@@ -49,8 +49,7 @@ use core::panic::PanicInfo;
|
||||
|
||||
#[cfg(not(test))] // only compile when the test flag is not set
|
||||
#[panic_handler]
|
||||
#[no_mangle]
|
||||
pub fn panic(info: &PanicInfo) -> ! {
|
||||
fn panic(info: &PanicInfo) -> ! {
|
||||
println!("{}", info);
|
||||
loop {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user