Skip to content

Commit ebca26c

Browse files
committed
auto merge of #7163 : brson/rust/reinterpret-cast, r=thestinger
2 parents c154899 + 0f9c191 commit ebca26c

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/libstd/cast.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,14 @@ pub unsafe fn transmute_copy<T, U>(src: &T) -> U {
5454
*
5555
* The forget function will take ownership of the provided value but neglect
5656
* to run any required cleanup or memory-management operations on it. This
57-
* can be used for various acts of magick, particularly when using
58-
* reinterpret_cast on pointer types.
57+
* can be used for various acts of magick.
5958
*/
6059
#[inline(always)]
6160
pub unsafe fn forget<T>(thing: T) { intrinsics::forget(thing); }
6261

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

0 commit comments

Comments
 (0)