Skip to content

Commit b6e9f08

Browse files
hosseind75hosseind88
authored and
hosseind88
committed
show a message when we are showing limited slice of query stack
1 parent 2bfdd64 commit b6e9f08

File tree

5 files changed

+7
-0
lines changed

5 files changed

+7
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ 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+
}
130133
// Be careful reyling on global state here: this code is called from
131134
// a panic hook, which means that the global `Handler` may be in a weird
132135
// state if it was responsible for triggering the panic.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ 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
1516
#0 [check_match] match-checking `main`
1617
#1 [analysis] running analysis passes on this crate
1718
we're just showing a limited slice of the query stack

src/test/ui/proc-macro/invalid-punct-ident-1.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
query stack during panic:
2+
we're just showing a limited slice of the query stack
23
end of query stack
34
error: proc macro panicked
45
--> $DIR/invalid-punct-ident-1.rs:19:1

src/test/ui/proc-macro/invalid-punct-ident-2.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
query stack during panic:
2+
we're just showing a limited slice of the query stack
23
end of query stack
34
error: proc macro panicked
45
--> $DIR/invalid-punct-ident-2.rs:19:1

src/test/ui/proc-macro/invalid-punct-ident-3.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
query stack during panic:
2+
we're just showing a limited slice of the query stack
23
end of query stack
34
error: proc macro panicked
45
--> $DIR/invalid-punct-ident-3.rs:19:1

0 commit comments

Comments
 (0)