We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea8dba4 commit f389d46Copy full SHA for f389d46
src/diagnostics.rs
@@ -96,6 +96,9 @@ fn prune_stacktrace<'mir, 'tcx>(
96
) -> (Vec<FrameInfo<'tcx>>, bool) {
97
match ecx.machine.backtrace_style {
98
BacktraceStyle::Off => {
99
+ // Remove all frames marked with `caller_location` -- that attribute indicates we
100
+ // usually want to point at the caller, not them.
101
+ stacktrace.retain(|frame| !frame.instance.def.requires_caller_location(*ecx.tcx));
102
// Retain one frame so that we can print a span for the error itself
103
stacktrace.truncate(1);
104
(stacktrace, false)
0 commit comments