Skip to content

Commit eef8a02

Browse files
committed
Add test that caused query cycle with unevaluated const
1 parent c5dabe8 commit eef8a02

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//@ compile-flags: -Znext-solver
2+
//@ check-pass
3+
4+
// Regression test for https://github.com/rust-lang/trait-system-refactor-initiative/issues/249
5+
6+
const CONST: &str = "hi";
7+
8+
trait ToUnit {
9+
type Assoc;
10+
}
11+
impl<T> ToUnit for T {
12+
type Assoc = ();
13+
}
14+
15+
fn foo()
16+
where
17+
<[u8; CONST.len()] as ToUnit>::Assoc: Sized,
18+
{}
19+
20+
fn main(){}

0 commit comments

Comments
 (0)