Skip to content

Tracking Issue for const_transmute_copy #83165

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
1 of 3 tasks
usbalbin opened this issue Mar 15, 2021 · 6 comments · Fixed by #115520
Closed
1 of 3 tasks

Tracking Issue for const_transmute_copy #83165

usbalbin opened this issue Mar 15, 2021 · 6 comments · Fixed by #115520
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@usbalbin
Copy link
Contributor

usbalbin commented Mar 15, 2021

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

Unresolved Questions

  • None yet.
@usbalbin usbalbin added C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Mar 15, 2021
@RalfJung

This comment has been minimized.

@RalfJung

This comment has been minimized.

@Finomnis
Copy link
Contributor

Finomnis commented Aug 28, 2023

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
Copy link
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
Copy link
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
Copy link
Member

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants