@lcnr mentioned "no where bounds," but I'm not sure exactly what they meant by this.
My initial goal is to try and have the const generics MVP not depend on lazy_normalization_consts
.
This causes cycle errors when const expressions are used in bounds:
#![feature(const_generics)]
pub trait Foo<const B: bool> {}
pub fn bar<T: Foo<{ true }>>() {}
// ^^^^^^^^ cycle error
These cycle errors are really easy to hit and have horrible error messages, so I don't want them on stable.
The two solutions are probably to either to wait until lazy_normalization_consts
is good enough to also get stabilized at the same time or forbid generics inside of consts inside of bounds.
We already probably have to restrict generics in this way in some other places, for example inside of type defaults. See the relevant zulip discussion for more details.
edit: we might actually have to first stabilize lazy norm here. I forgot this hack exists, will look a bit deeper into it this week. So restricting bounds this way might be unnecessary
second edit: it seems like we don't have to stabilize lazy norm first, see Stabilizing a const generics MVP for the relevant update