about summary refs log tree commit diff
path: root/src/test/run-pass/thinlto
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-11-08 12:13:45 -0800
committerGitHub <noreply@github.com>2016-11-08 12:13:45 -0800
commit0491a231777735ba050c208ce621df93f863bf7c (patch)
tree6727b82d88cd92b18b3d0e3dd39a1221310e482f /src/test/run-pass/thinlto
parent38a959a543dfc70a67e64f7d369ed6c9e12fc806 (diff)
parent651cf58f2e906fa6d333013891adca5074440bea (diff)
downloadrust-0491a231777735ba050c208ce621df93f863bf7c.tar.gz
rust-0491a231777735ba050c208ce621df93f863bf7c.zip
Auto merge of #37192 - cristicbz:rust-rc-into-raw, r=brson
Add `{into,from}_raw` to Rc and Arc

These methods convert to and from a `*const T` for `Rc` and `Arc` similar to the way they work on `Box`. The only slight complication is that `from_raw` needs to offset the pointer back to find the beginning of the `RcBox`/`ArcInner`.

I felt this is a fairly small addition, filling in a gap (when compared to `Box`) so it wouldn't need an RFC. The motivation is primarily for FFI.

(I'll create an issue and update a PR with the issue number if reviewers agree with the change in principle **Edit: done #37197**)

~~Edit: This was initially `{into,from}_raw` but concerns were raised about the possible footgun if mixed with the methods of the same name of `Box`.~~

Edit: This was went from `{into,from}_raw` to `{into,from}_inner_raw` then back to `{into,from}_raw` during review.
Diffstat (limited to 'src/test/run-pass/thinlto')
0 files changed, 0 insertions, 0 deletions