Last active
April 30, 2019 22:56
-
-
Save davepacheco/5496d51055ca934eb43d493f4b9ff60b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dap@blinky manta-mreq $ rustc -g test.rs | |
dap@blinky manta-mreq $ RUST_BACKTRACE=1 ./test | |
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:345:21 | |
stack backtrace: | |
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace | |
at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39 | |
1: std::sys_common::backtrace::_print | |
at src/libstd/sys_common/backtrace.rs:70 | |
2: std::panicking::default_hook::{{closure}} | |
at src/libstd/sys_common/backtrace.rs:58 | |
at src/libstd/panicking.rs:200 | |
3: std::panicking::default_hook | |
at src/libstd/panicking.rs:215 | |
4: <std::panicking::begin_panic::PanicPayload<A> as core::panic::BoxMeUp>::get | |
at src/libstd/panicking.rs:478 | |
5: std::panicking::continue_panic_fmt | |
at src/libstd/panicking.rs:385 | |
6: std::panicking::try::do_call | |
at src/libstd/panicking.rs:312 | |
7: <T as core::any::Any>::type_id | |
at src/libcore/panicking.rs:85 | |
8: <T as core::any::Any>::type_id | |
at src/libcore/panicking.rs:49 | |
9: <core::option::Option<T>>::unwrap | |
at /rustc/fc50f328b0353b285421b8ff5d4100966387a997/src/libcore/macros.rs:11 | |
10: test::two | |
at ./test.rs:14 | |
11: test::one | |
at ./test.rs:8 | |
12: test::main | |
at ./test.rs:3 | |
13: std::rt::lang_start::{{closure}} | |
at /rustc/fc50f328b0353b285421b8ff5d4100966387a997/src/libstd/rt.rs:64 | |
14: std::panicking::try::do_call | |
at src/libstd/rt.rs:49 | |
at src/libstd/panicking.rs:297 | |
15: panic_unwind::dwarf::eh::read_encoded_pointer | |
at src/libpanic_unwind/lib.rs:87 | |
16: <std::panicking::begin_panic::PanicPayload<A> as core::panic::BoxMeUp>::get | |
at src/libstd/panicking.rs:276 | |
at src/libstd/panic.rs:388 | |
at src/libstd/rt.rs:48 | |
17: std::rt::lang_start | |
at /rustc/fc50f328b0353b285421b8ff5d4100966387a997/src/libstd/rt.rs:64 | |
18: test::two |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() | |
{ | |
one(); | |
} | |
fn one() | |
{ | |
two(); | |
} | |
fn two() | |
{ | |
let x : Option<i16> = None; | |
x.unwrap(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment