3 ms·
All this tells me is that Rust gives crappy useless stack traces that include noise of functions handling the panic itself and the creation of the stack trace,
by Sohcahtoa82 6y ago
All this tells me is that Rust gives crappy useless stack traces that include noise of functions handling the panic itself and the creation of the stack trace, and this has poisoned your view of stack traces.
Why can't Rust produce much more readable, concise, and useful stack traces like Python, that include the function name, file name, and line number of each step of the stack?
- steveklabnik 6y agoThe majority of those lines are including the function name, the file name, and the line number.
- Sohcahtoa82 6y agoLook closer. The only ones with line numbers are library code handling the panic. None of the actual user code has line numbers or even the file name, just a function name.
- steveklabnik 6y agosrc\main.rs:104:17 is.
- Sohcahtoa82 6y agoOh, so you're right. There it is right at the very top of the error. So why couldn't the trace include that in that in the body?
- steveklabnik 6y agoBecause the backtrace is optional, the formatting is consistent with it and without it; you get that line no matter what.