examples/panic: add column information

This commit is contained in:
Jorge Aparicio
2018-02-26 21:55:25 +01:00
parent 46c97c6cee
commit 5206ef79d2

View File

@@ -29,7 +29,7 @@ fn main() {
#[lang = "panic_fmt"]
#[no_mangle]
unsafe extern "C" fn rust_begin_unwind(
pub unsafe extern "C" fn rust_begin_unwind(
args: core::fmt::Arguments,
file: &'static str,
line: u32,
@@ -40,7 +40,7 @@ unsafe extern "C" fn rust_begin_unwind(
.and_then(|_| {
stdout
.write_fmt(args)
.and_then(|_| writeln!(stdout, "', {}:{}", file, line))
.and_then(|_| writeln!(stdout, "', {}:{}:{}", file, line, col))
})
.ok();
}