Skip to content

Commit f7db329

Browse files
Add a test to reproduce ICE
1 parent aae43c4 commit f7db329

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
//@ compile-flags: -Z query-dep-graph
2+
//@ revisions: rpass1
3+
4+
// Exercises a debug-assertions-only query cycle that when printing a valtree const in
5+
// a dep node's debug representation, we end up invoking a query that also has a valtree
6+
// const in its dep node's debug representation, which leads to a cycle (and ICE, since
7+
// deps are not tracked when printing dep nodes' debug representations).
8+
9+
#![feature(adt_const_params)]
10+
11+
use std::marker::ConstParamTy;
12+
13+
#[derive(Debug, ConstParamTy, PartialEq, Eq)]
14+
enum Foo {
15+
A1,
16+
}
17+
18+
#[inline(never)]
19+
fn hello<const F: Foo>() {
20+
println!("{:#?}", F);
21+
}
22+
23+
fn main() {
24+
hello::<{ Foo::A1 }>();
25+
}

0 commit comments

Comments
 (0)