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

Deprecation of copy_lifetime: "its questionable utility" is questionable #20888

Closed
mzabaluev opened this issue Jan 10, 2015 · 1 comment
Closed

Comments

@mzabaluev
Copy link
Contributor

The unsafe utility function std::mem::copy_lifetime has been slapped with a deprecation notice:

this function may be removed in the future due to its questionable utility

Its utility, to me at least, is clear: it's a gentler hammer than std::mem::transmute for casting raw pointers into references. Now it is helpful to fix the shortcomings of raw pointer conversion functions (#20031), and if my RFC to improve those is accepted, it could be used to implement the lifetime-anchored variants.

@alexcrichton
Copy link
Member

The function is actually currently unstable, not deprecated. We chose to conservatively not stabilize this function before alpha, but we can certainly revisit that decision!

This issue isn't particularly actionable, and I think that the stability of this function will certainly come up during the discussion of your RFC as well as #20031, so I'm going to close this for now.

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

2 participants