From f4c9c12047a3d6184709eedacc16ef1cc6ff5f40 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Sat, 26 Nov 2016 12:17:12 +0100 Subject: [PATCH] Fix panic_fmt arguments in post --- blog/post/05-allocating-frames.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/blog/post/05-allocating-frames.md b/blog/post/05-allocating-frames.md index df306c3e..f9eec739 100644 --- a/blog/post/05-allocating-frames.md +++ b/blog/post/05-allocating-frames.md @@ -112,7 +112,9 @@ Now we get a `PANIC` message. But we can do even better. The `panic_fmt` functio ```rust #[lang = "panic_fmt"] -extern fn panic_fmt(fmt: core::fmt::Arguments, file: &str, line: u32) -> ! { +extern fn panic_fmt(fmt: core::fmt::Arguments, file: &'static str, + line: u32) -> ! +{ println!("\n\nPANIC in {} at line {}:", file, line); println!(" {}", fmt); loop{}