mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-17 06:47:49 +00:00
Rfc 2070 panic implementation deprecated (#467)
* Make changes to code examples. * Explain that panic_implementation has been deprecated * Update attributes in source code.
This commit is contained in:
@@ -199,14 +199,13 @@ Compiling for our new target will use Linux conventions (I'm not quite sure why,
|
||||
```rust
|
||||
// src/main.rs
|
||||
|
||||
#![feature(panic_implementation)] // required for defining the panic handler
|
||||
#![no_std] // don't link the Rust standard library
|
||||
#![no_main] // disable all Rust-level entry points
|
||||
|
||||
use core::panic::PanicInfo;
|
||||
|
||||
/// This function is called on panic.
|
||||
#[panic_implementation]
|
||||
#[panic_handler]
|
||||
#[no_mangle]
|
||||
pub fn panic(_info: &PanicInfo) -> ! {
|
||||
loop {}
|
||||
|
||||
Reference in New Issue
Block a user