It seems like an easy usability feature would be context information on
Right now if you unwrap(), the panic produces the message that comes from the error type you’re unwrapping (or simply that you tried to unwrap a None). I would like to see the compiler inject source file and line of the actual call to unwrap.
Why? It’s generally impossible to track down where the unwrap occurred unless you have debugging enabled (not always possible). I imagine that a lot of us have reluctantly had to go through their code replacing all their
Runtime cost would be that an extra binary string would be stored in the executable. No other performance penalty.