about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-03-13 18:11:34 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-03-13 18:11:34 +0530
commitb00c310985d5ecd2439672ab595f81aaaf0a7382 (patch)
treeab86a014b93863c6f80a60d25764e984df9a31f2 /src/rustllvm/RustWrapper.cpp
parentda054a5f87cb857e0c1b8684d32bb04064b9aaf1 (diff)
parent5d9ed0bc0e7922fb1fbdc518edc9bacb342fad6e (diff)
downloadrust-b00c310985d5ecd2439672ab595f81aaaf0a7382.tar.gz
rust-b00c310985d5ecd2439672ab595f81aaaf0a7382.zip
Rollup merge of #23312 - gkoz:ptr_from_box_docs, r=steveklabnik
 Show how to get a pointer without destroying the box.
Use `boxed::into_raw` instead of `mem::transmute`.

I removed the `let my_num: *const i32 = mem::transmute(my_num);` case altogether because we own the box, a `*mut` pointer is good anywhere a `*const` is needed, `from_raw` takes a mutable pointer and casting from a `*const` caused an ICE.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions