auto merge of #6387 : brson/rust/unstable, r=brson

r? @pcwalton

* Move `SharedMutableState`, `LittleLock`, and `Exclusive` from `core::unstable` to `core::unstable::sync`
* Modernize the `SharedMutableState` interface with methods
* Rename `SharedMutableState` to `UnsafeAtomicRcBox` to match `RcBox`.
This commit is contained in:
bors 2013-05-13 14:49:48 -07:00
commit ad5bfd600d
13 changed files with 434 additions and 424 deletions

View file

@ -9,7 +9,7 @@
// except according to those terms.
fn main() {
let x = Some(unstable::exclusive(false));
let x = Some(unstable::sync::exclusive(false));
match x {
Some(copy z) => { //~ ERROR copying a value of non-copyable type
do z.with |b| { assert!(!*b); }

View file

@ -9,7 +9,7 @@
// except according to those terms.
pub fn main() {
let x = Some(unstable::exclusive(true));
let x = Some(unstable::sync::exclusive(true));
match x {
Some(ref z) if z.with(|b| *b) => {
do z.with |b| { assert!(*b); }