Skip to content

Commit cdd3126

Browse files
committed
fix show we're just showing... message instead of the end of query stack message when RUST_BACKTRACE=0
1 parent d8af4b3 commit cdd3126

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

compiler/rustc_middle/src/ty/query/plumbing.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,6 @@ impl<'tcx> TyCtxt<'tcx> {
127127
pub fn try_print_query_stack(handler: &Handler, num_frames: Option<usize>) {
128128
eprintln!("query stack during panic:");
129129

130-
if num_frames != None {
131-
eprintln!("we're just showing a limited slice of the query stack");
132-
}
133130
// Be careful reyling on global state here: this code is called from
134131
// a panic hook, which means that the global `Handler` may be in a weird
135132
// state if it was responsible for triggering the panic.
@@ -169,7 +166,11 @@ impl<'tcx> TyCtxt<'tcx> {
169166
}
170167
});
171168

172-
eprintln!("end of query stack");
169+
if num_frames != None {
170+
eprintln!("we're just showing a limited slice of the query stack");
171+
} else {
172+
eprintln!("end of query stack");
173+
}
173174
}
174175
}
175176

src/test/ui/pattern/const-pat-ice.stderr

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ note: rustc VERSION running on TARGET
1212
note: compiler flags: FLAGS
1313

1414
query stack during panic:
15-
we're just showing a limited slice of the query stack
1615
#0 [check_match] match-checking `main`
1716
#1 [analysis] running analysis passes on this crate
18-
end of query stack
17+
we're just showing a limited slice of the query stack

0 commit comments

Comments
 (0)