1
Fork 0

Make it illegal to use modes in a fn signature with providing

an explicit variable name. (Step one to changing the defaults)

First step to #3535
This commit is contained in:
Niko Matsakis 2012-09-23 04:39:27 -07:00
parent 2e7ddee823
commit ba3eebd41d
35 changed files with 111 additions and 92 deletions

View file

@ -340,7 +340,7 @@ impl<T: Const Send> &RWARC<T> {
* }
* ~~~
*/
fn write_downgrade<U>(blk: fn(+RWWriteMode<T>) -> U) -> U {
fn write_downgrade<U>(blk: fn(+v: RWWriteMode<T>) -> U) -> U {
let state = unsafe { get_shared_mutable_state(&self.x) };
do borrow_rwlock(state).write_downgrade |write_mode| {
check_poison(false, state.failed);