Avoid calling queries during query stack printing
This commit is contained in:
parent
5d3377dd67
commit
b0142f603d
5 changed files with 38 additions and 13 deletions
|
@ -349,7 +349,12 @@ pub fn try_print_query_stack(handler: &Handler, num_frames: Option<usize>) {
|
|||
// state if it was responsible for triggering the panic.
|
||||
let i = ty::tls::with_context_opt(|icx| {
|
||||
if let Some(icx) = icx {
|
||||
print_query_stack(QueryCtxt::new(icx.tcx), icx.query, handler, num_frames)
|
||||
ty::print::with_no_queries!(print_query_stack(
|
||||
QueryCtxt::new(icx.tcx),
|
||||
icx.query,
|
||||
handler,
|
||||
num_frames
|
||||
))
|
||||
} else {
|
||||
0
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue