You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The unsafe utility function
std::mem::copy_lifetime
has been slapped with a deprecation notice: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.The text was updated successfully, but these errors were encountered: