mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
Don't mention the deprecated panic_implementation
It existed only for a very short time, so I think that not many people will remember this attribute.
This commit is contained in:
@@ -134,11 +134,7 @@ This sets the panic strategy to `abort` for both the `dev` profile (used for `ca
|
||||
|
||||
### Panic Implementation
|
||||
|
||||
The `panic_impl` language item defines the function that the compiler should invoke when a [panic] occurs. Instead of providing the language item directly, we can use the [`panic_handler`] attribute to create a `panic` function. This used to take the for [`panic_implementation`], which has been deprecated and replaced by [`panic_handler`].
|
||||
|
||||
[`panic_implementation`]: https://github.com/rust-lang/rfcs/blob/master/text/2070-panic-implementation.md#panic_implementation
|
||||
|
||||
Note: [`panic_implementation`] has been deprecated, and we now use [`panic_handler`] instead
|
||||
The `panic_impl` language item defines the function that the compiler should invoke when a [panic] occurs. Instead of providing the language item directly, we can use the [`panic_handler`] attribute to create a `panic` function.
|
||||
|
||||
```rust
|
||||
// in main.rs
|
||||
|
||||
Reference in New Issue
Block a user