Skip to content

Tracking Issue for const_transmute_copy #83165

Closed
@usbalbin

Description

@usbalbin
Contributor

Feature gate: #![feature(const_transmute_copy)]

This is a tracking issue for making the function mem::transmute_copy const fn.

Public API

mod mem {
    pub const unsafe fn transmute_copy<T, U>(src: &T) -> U;
}

Steps / History

  • Final commenting period (FCP)
    Stabilization PR

Unresolved Questions

  • None yet.

Activity

added
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.
on Mar 15, 2021
RalfJung

RalfJung commented on Jun 14, 2021

@RalfJung
RalfJung

RalfJung commented on Jun 14, 2021

@RalfJung
Finomnis

Finomnis commented on Aug 28, 2023

@Finomnis
Contributor

Any news on this? I don't see anything holding it back; especially now that transmute itself is const.

EDIT: Never mind, I just saw #85769 (comment).

RalfJung

RalfJung commented on Aug 28, 2023

@RalfJung
Member

Since ptr.read() is const-stable nowadays, I think this can be stabilized as well. Feel free to open a PR. :)

Cc @rust-lang/wg-const-eval

Finomnis

Finomnis commented on Aug 28, 2023

@Finomnis
Contributor

@RalfJung I didn't do this before, I am reading the docs for how to do this, and there's an rfcbot final commenting period thing. Should this be done? If yes, how? I probably don't have the rights to do it.

RalfJung

RalfJung commented on Aug 28, 2023

@RalfJung
Member

You just need to prepare a PR. I can help get the FCP process started in the PR.

added a commit that references this issue on Sep 16, 2023

Auto merge of rust-lang#115520 - Finomnis:const_transmute_copy, r=dto…

e81f85f
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

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @RalfJung@Finomnis@usbalbin

      Issue actions

        Tracking Issue for const_transmute_copy · Issue #83165 · rust-lang/rust