2 #![feature(const_generics)]
3 #![allow(incomplete_features)]
5 // The goal is is to get an unevaluated const `ct` with a `Ty::Infer(TyVar(_#1t)` subst.
7 // If we are then able to infer `ty::Infer(TyVar(_#1t) := Ty<ct>` we introduced an
8 // artificial inference cycle.
9 struct Foo<const N: usize>;
12 fn bind() -> (T, Self);
15 // `N` has to be `ConstKind::Unevaluated`.
16 impl<T> Bind<T> for Foo<{ 6 + 1 }> {
17 fn bind() -> (T, Self) {
23 let (mut t, foo) = Foo::bind();
24 // `t` is `ty::Infer(TyVar(_#1t))`
25 // `foo` contains `ty::Infer(TyVar(_#1t))` in its substs