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.