Skip to content

Disable const-stability checking for intrinsics with fallback MIR? #122652

Closed
@scottmcm

Description

@scottmcm

As suggested in #122582 (comment), I moved my new intrinsic to core::intrinsics. But that meant I started getting a new error:

error: `typed_swap` is not yet stable as a const fn
   --> library\core\src\mem\mod.rs:731:14
    |
731 |     unsafe { intrinsics::typed_swap(x, y) }
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Is that error useful for things with fallback MIR that's already const-checked? Could we skip it?

(Maybe doing that in the same PR that would make CTFE capable of using fallback MIR?)

cc @oli-obk

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-intrinsicsArea: IntrinsicsC-discussionCategory: Discussion or questions that doesn't represent real issues.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions