Stack traces, human panic, and failure::Context are essentially runtime docs. They provide contextual information when something goes wrong. Output depends on what went wrong. Also you'll never want them ahead of time, but only when inspecting the program.
-
-
Oh wait, I forgot about miri. Very excited again about what miri will make possible. Wonder if we could extend that workflow. Both for debug and release Rust, though probably to different degrees.
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
The problem is code ownership and responsibilities, what invariant went wrong is not something the compiler can figure out because it's a higher level concept not encoded in the type system. (If it could be, it wouldn't be a panic)
-
It's often the first frame (or in the case of unwrap, the second frame), but not always. (There's an rfc for implicit caller location that makes this somewhat nicer for the semi-common case)
- 8 more replies
New conversation -
-
-
My kingdom for rustc telling me exactly where the panic happened and not libcore
-
oh yes please! can we add hooks to backtrace printing so it ends with a line like "oh hey, you should probably click here: src/foo/bar/shitty_module.rs:42"?
- 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.