new borrow checker (mass squash)
This commit is contained in:
parent
b5a7e8b353
commit
a896440ca1
172 changed files with 6475 additions and 4303 deletions
|
@ -419,26 +419,26 @@ pub struct RWReadMode<'self, T> {
|
|||
|
||||
pub impl<'self, T:Const + Owned> RWWriteMode<'self, T> {
|
||||
/// Access the pre-downgrade RWARC in write mode.
|
||||
fn write<U>(&self, blk: &fn(x: &mut T) -> U) -> U {
|
||||
fn write<U>(&mut self, blk: &fn(x: &mut T) -> U) -> U {
|
||||
match *self {
|
||||
RWWriteMode {
|
||||
data: ref data,
|
||||
data: &ref mut data,
|
||||
token: ref token,
|
||||
poison: _
|
||||
} => {
|
||||
do token.write {
|
||||
blk(&mut **data)
|
||||
blk(data)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/// Access the pre-downgrade RWARC in write mode with a condvar.
|
||||
fn write_cond<'x, 'c, U>(&self,
|
||||
fn write_cond<'x, 'c, U>(&mut self,
|
||||
blk: &fn(x: &'x mut T, c: &'c Condvar) -> U)
|
||||
-> U {
|
||||
match *self {
|
||||
RWWriteMode {
|
||||
data: ref data,
|
||||
data: &ref mut data,
|
||||
token: ref token,
|
||||
poison: ref poison
|
||||
} => {
|
||||
|
@ -449,7 +449,7 @@ pub impl<'self, T:Const + Owned> RWWriteMode<'self, T> {
|
|||
failed: &mut *poison.failed,
|
||||
cond: cond
|
||||
};
|
||||
blk(&mut **data, &cvar)
|
||||
blk(data, &cvar)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue