Stabilization error E0658 is trivially bypassed · Issue #90912 · rust-lang/rust (original) (raw)

trait IsMagic {}

const fn foo() where T: IsMagic {} // Does not compile const fn bar() where (T,): IsMagic {} // Compiles

error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable

I already have code unintentionally relying on this, so please don't break it 😅

The first case should probably just be stabilized, since you can already rely on it.

Also, the stabilization issue the error message references doesn't actually mention this error, so it's not clear what work is left to do on it.