about summary refs log tree commit diff
path: root/src/rustllvm/ExecutionEngineWrapper.cpp
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-04-02 00:40:38 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-04-02 00:40:38 +0530
commit1d17e6eb1e181ef37cbb2d2df05bc84db7e4be8f (patch)
treef334ae2f869364d2c86030e2fb2c60011ae38770 /src/rustllvm/ExecutionEngineWrapper.cpp
parent02b38a2497c48c6195cdde4934ea08753f5b5539 (diff)
parent39aa668a01fb671cff382a8237ec3993c9cc4c33 (diff)
downloadrust-1d17e6eb1e181ef37cbb2d2df05bc84db7e4be8f.tar.gz
rust-1d17e6eb1e181ef37cbb2d2df05bc84db7e4be8f.zip
Rollup merge of #23844 - kvark:try_unique, r=alexcrichton
While trying to implement parallel ECS processing, I stumbled upon the need to mutate `Arc` contents. The only existed method that allowed that was `make_unique`, but it has issues:
  - it may clone the data as if nothing happened, where the program may just need to crash
  - it forces `Clone` bound, which I don't have

The new `try_unique` allows accessing the contents mutably without `Clone` bound and error out if the pointer is not unique.
Diffstat (limited to 'src/rustllvm/ExecutionEngineWrapper.cpp')
0 files changed, 0 insertions, 0 deletions