about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-08-01 09:46:06 +0000
committerbors <bors@rust-lang.org>2014-08-01 09:46:06 +0000
commitf2153465e47ac280a260e9a30466acbcfaf6832d (patch)
tree4100dbcdd6e9e9ec12f76f866ecb27eba055b3d5 /src/rustllvm/RustWrapper.cpp
parentcd1216a05403dd91b9c60c66418ab12555e923f5 (diff)
parent192a8a5db75802d10a6f3a63ab28600df75ec3d8 (diff)
downloadrust-f2153465e47ac280a260e9a30466acbcfaf6832d.tar.gz
rust-f2153465e47ac280a260e9a30466acbcfaf6832d.zip
auto merge of #16101 : kballard/rust/rc_unique_ownership, r=aturon
Add a few new free functions to alloc::rc for manipulating
uniquely-owned Rc values. is_unique() can be used to test if the Rc is
uniquely-owned, try_unwrap() can remove the value from a uniquely-owned
Rc, and get_mut() can return a &mut for a uniquely-owned Rc.

These are all free functions, because smart pointers should avoid having
methods when possible. They can't be static methods because UFCS will
remove that distinction. I think we should probably change downgrade()
and make_unique() into free functions as well, but that's out of scope.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions