I was reading the issue Better runtime panic message for RefCell borrow and noticed "this is probably just missing a few
#[track_caller]". But then I thought, sometimes it is probably useful to have the full backtrace, although the default should be short ones.
My first idea was to have a
RUST_BACKTRACE=short, but while digging around before posting this I found the issue Rust never lets you know about RUST_BACKTRACE=full which led me to this parsing part of it in the code and I saw that the "short" option is already present. The book does not mention
full backtraces unless I missed it, and maybe it could be useful if it taught about full backtraces too.
The main question is then, does
RUST_BACKTRACE=1 honours it? If that's the case, great, there's nothing new on my original idea as things work as intended (but could be documented to avoid questions like these).
If it doesn't though (all of them honour
#[track_caller]), then I guess my proposed idea boils down to
RUST_BACKTRACE=full to ignore
#[track_caller] because we already have a short one, which is the one honouring