Skip to content

Stabilization error E0658 is trivially bypassed #90912

Closed

Description

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.

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

Metadata

Assignees

No one assigned

    Labels

    A-const-fnArea: const fn foo(..) {..}. Pure functions which can be applied at compile time.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