File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
compiler/rustc_middle/src/ty/query Expand file tree Collapse file tree 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> {
130130 // Be careful reyling on global state here: this code is called from
131131 // a panic hook, which means that the global `Handler` may be in a weird
132132 // state if it was responsible for triggering the panic.
133+ let mut i = 0 ;
133134 ty:: tls:: with_context_opt ( |icx| {
134135 if let Some ( icx) = icx {
135136 let query_map = icx. tcx . queries . try_collect_active_jobs ( ) ;
136137
137138 let mut current_query = icx. query ;
138- let mut i = 0 ;
139139
140140 while let Some ( query) = current_query {
141141 if Some ( i) == num_frames {
@@ -166,10 +166,10 @@ impl<'tcx> TyCtxt<'tcx> {
166166 }
167167 } ) ;
168168
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) {
172170 eprintln ! ( "end of query stack" ) ;
171+ } else {
172+ eprintln ! ( "we're just showing a limited slice of the query stack" ) ;
173173 }
174174 }
175175}
You can’t perform that action at this time.
0 commit comments