examples/panic: add column information
This commit is contained in:
@@ -29,7 +29,7 @@ fn main() {
|
|||||||
|
|
||||||
#[lang = "panic_fmt"]
|
#[lang = "panic_fmt"]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
unsafe extern "C" fn rust_begin_unwind(
|
pub unsafe extern "C" fn rust_begin_unwind(
|
||||||
args: core::fmt::Arguments,
|
args: core::fmt::Arguments,
|
||||||
file: &'static str,
|
file: &'static str,
|
||||||
line: u32,
|
line: u32,
|
||||||
@@ -40,7 +40,7 @@ unsafe extern "C" fn rust_begin_unwind(
|
|||||||
.and_then(|_| {
|
.and_then(|_| {
|
||||||
stdout
|
stdout
|
||||||
.write_fmt(args)
|
.write_fmt(args)
|
||||||
.and_then(|_| writeln!(stdout, "', {}:{}", file, line))
|
.and_then(|_| writeln!(stdout, "', {}:{}:{}", file, line, col))
|
||||||
})
|
})
|
||||||
.ok();
|
.ok();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user