File tree 1 file changed +4
-4
lines changed
compiler/rustc_middle/src/ty/query
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -130,12 +130,12 @@ impl<'tcx> TyCtxt<'tcx> {
130
130
// Be careful reyling on global state here: this code is called from
131
131
// a panic hook, which means that the global `Handler` may be in a weird
132
132
// state if it was responsible for triggering the panic.
133
+ let mut i = 0 ;
133
134
ty:: tls:: with_context_opt ( |icx| {
134
135
if let Some ( icx) = icx {
135
136
let query_map = icx. tcx . queries . try_collect_active_jobs ( ) ;
136
137
137
138
let mut current_query = icx. query ;
138
- let mut i = 0 ;
139
139
140
140
while let Some ( query) = current_query {
141
141
if Some ( i) == num_frames {
@@ -166,10 +166,10 @@ impl<'tcx> TyCtxt<'tcx> {
166
166
}
167
167
} ) ;
168
168
169
- if num_frames != None {
170
- eprintln ! ( "we're just showing a limited slice of the query stack" ) ;
171
- } else {
169
+ if num_frames == None || num_frames >= Some ( i) {
172
170
eprintln ! ( "end of query stack" ) ;
171
+ } else {
172
+ eprintln ! ( "we're just showing a limited slice of the query stack" ) ;
173
173
}
174
174
}
175
175
}
You can’t perform that action at this time.
0 commit comments