Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

core lacks a stable version of transmute #59573

Closed
Lokathor opened this issue Mar 30, 2019 · 6 comments
Closed

core lacks a stable version of transmute #59573

Lokathor opened this issue Mar 30, 2019 · 6 comments

Comments

@Lokathor
Copy link
Contributor

We obviously have std::mem::transmute, but for core we only have

  • core::intrinsics::transmute: unstable / feature gated
  • core::mem::transmute_copy: which is actually more dangerous than transmute because it's missing the "before and after have the same size" check.

So can we get core::mem::transmute?

@jonas-schievink
Copy link
Contributor

It's there, it's just a reexport of the intrinsic: https://doc.rust-lang.org/core/mem/index.html#reexports

@jonas-schievink
Copy link
Contributor

(which is stable, so I don't know what you're referring to)

@Lokathor
Copy link
Contributor Author

Oh, well then the docs are messed up because if you search for transmute it doesn't list out core::mem::transmute as being available.

@Lokathor
Copy link
Contributor Author

On the Discord I was referred to this PR: #57848

but that's from back in January, so it's confusing why the search still doesn't work right

https://doc.rust-lang.org/std/index.html?search=transmute

@Arnavion
Copy link

@Lokathor I see core::mem::transmute in your link.

(Note that the search index is defined in a .js file that can be cached. If you still don't see it, try hard-refreshing.)

@Lokathor
Copy link
Contributor Author

alright, just some confusion then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants