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:
commit
ad5bfd600d
13 changed files with 434 additions and 424 deletions
|
|
@ -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); }
|
||||
|
|
|
|||
|
|
@ -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); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue