当发生错误时, DoingRUST_BACKTRACE=1 cargo run
会给出堆栈跟踪,如下所示。有什么方法可以获取文件和行号而不是十六进制地址?
thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: Parsing: invalid encoding byte', /Users/rustbuild/src/rust-buildbot/slave/stable-dist-rustc-mac/build/src/libcore/result.rs:729
stack backtrace:
1: 0x104c9403f - sys::backtrace::write::h7807ec07859fb503t1r
2: 0x104c980e4 - panicking::on_panic::ha0ed2b9b562a7f9ctZv
3: 0x104c7c4d5 - rt::unwind::begin_unwind_inner::hbfb8d99cb52be7a1cHv
4: 0x104c7cd66 - rt::unwind::begin_unwind_fmt::hac7eda7c3f3b8498QFv
5: 0x104c979bc - rust_begin_unwind
6: 0x104cb75f5 - panicking::panic_fmt::h051633da0da2e362wwy
7: 0x104be0877 - result::Result<T, E>::unwrap::h15040486031244389916
8: 0x104bdc6f1 - main::h393644ca2d1fdb82uLa
9: 0x104c99e18 - rust_try_inner
10: 0x104c99e05 - rust_try
11: 0x104c988e8 - rt::lang_start::h5324dae87dacdac8YTv
12: 0x104be500e - main
An unknown error occurred