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

std: Remove doc references to reinterpret_cast #7163

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/libstd/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,14 @@ pub unsafe fn transmute_copy<T, U>(src: &T) -> U {
*
* The forget function will take ownership of the provided value but neglect
* to run any required cleanup or memory-management operations on it. This
* can be used for various acts of magick, particularly when using
* reinterpret_cast on pointer types.
* can be used for various acts of magick.
*/
#[inline(always)]
pub unsafe fn forget<T>(thing: T) { intrinsics::forget(thing); }

/**
* Force-increment the reference count on a shared box. If used
* carelessly, this can leak the box. Use this in conjunction with transmute
* and/or reinterpret_cast when such calls would otherwise scramble a box's
* reference count
* carelessly, this can leak the box.
*/
#[inline(always)]
pub unsafe fn bump_box_refcount<T>(t: @T) { forget(t); }
Expand Down