Skip to content

Stabilization error E0658 is trivially bypassed #90912

Description

@Diggsey
trait IsMagic {}

const fn foo<T>() where T: IsMagic {} // Does not compile
const fn bar<T>() 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)C-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions