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:
Ben
2018-10-01 16:38:48 +08:00
committed by Philipp Oppermann
parent 0bd4fcd99e
commit 2a9075d642
10 changed files with 21 additions and 33 deletions

View File

@@ -627,7 +627,7 @@ Now that we have a `println` macro, we can use it in our panic function to print
// in main.rs
/// This function is called on panic.
#[panic_implementation]
#[panic_handler]
#[no_mangle]
pub fn panic(info: &PanicInfo) -> ! {
println!("{}", info);