show a message when we are showing limited slice of query stack

This commit is contained in:
hosseind75 2020-09-19 21:29:57 +04:30 committed by hosseind88
parent 2bfdd644dc
commit b6e9f08fbf
5 changed files with 7 additions and 0 deletions

View File

@ -127,6 +127,9 @@ impl<'tcx> TyCtxt<'tcx> {
pub fn try_print_query_stack(handler: &Handler, num_frames: Option<usize>) {
eprintln!("query stack during panic:");
if num_frames != None {
eprintln!("we're just showing a limited slice of the query stack");
}
// Be careful reyling on global state here: this code is called from
// a panic hook, which means that the global `Handler` may be in a weird
// state if it was responsible for triggering the panic.

View File

@ -12,6 +12,7 @@ note: rustc VERSION running on TARGET
note: compiler flags: FLAGS
query stack during panic:
we're just showing a limited slice of the query stack
#0 [check_match] match-checking `main`
#1 [analysis] running analysis passes on this crate
we're just showing a limited slice of the query stack

View File

@ -1,4 +1,5 @@
query stack during panic:
we're just showing a limited slice of the query stack
end of query stack
error: proc macro panicked
--> $DIR/invalid-punct-ident-1.rs:19:1

View File

@ -1,4 +1,5 @@
query stack during panic:
we're just showing a limited slice of the query stack
end of query stack
error: proc macro panicked
--> $DIR/invalid-punct-ident-2.rs:19:1

View File

@ -1,4 +1,5 @@
query stack during panic:
we're just showing a limited slice of the query stack
end of query stack
error: proc macro panicked
--> $DIR/invalid-punct-ident-3.rs:19:1