Skip to content

Commit a80b7dc

Browse files
committed
Fix use of reinterpret_cast in to_mut_unsafe_ptr
1 parent 512a769 commit a80b7dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/ptr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ fn to_unsafe_ptr<T>(thing: &T) -> *T unsafe {
146146
*/
147147
#[inline(always)]
148148
fn to_mut_unsafe_ptr<T>(thing: &mut T) -> *mut T unsafe {
149-
unsafe::reinterpret_cast(thing)
149+
unsafe::reinterpret_cast(&thing)
150150
}
151151

152152
/**

0 commit comments

Comments
 (0)