about summary refs log tree commit diff
path: root/src/libstd/unstable
diff options
context:
space:
mode:
authorChris Wong <lambda.fairy@gmail.com>2014-01-25 20:37:51 +1300
committerChris Wong <lambda.fairy@gmail.com>2014-01-25 21:38:25 +1300
commit988e4f0a1c2802921375271bdc19f03650c024d2 (patch)
treeb2d2913ca7575e8e52f2cf6e7975ca2f0f148286 /src/libstd/unstable
parentde57a22b9a8c8416cace31c9bd3ec4c9a6888017 (diff)
downloadrust-988e4f0a1c2802921375271bdc19f03650c024d2.tar.gz
rust-988e4f0a1c2802921375271bdc19f03650c024d2.zip
Uppercase numeric constants
The following are renamed:

* `min_value` => `MIN`
* `max_value` => `MAX`
* `bits` => `BITS`
* `bytes` => `BYTES`

Fixes #10010.
Diffstat (limited to 'src/libstd/unstable')
-rw-r--r--src/libstd/unstable/mutex.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/unstable/mutex.rs b/src/libstd/unstable/mutex.rs
index 69c6204cc32..ba965f2b5c5 100644
--- a/src/libstd/unstable/mutex.rs
+++ b/src/libstd/unstable/mutex.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -389,9 +389,9 @@ impl Once {
 
         let prev = self.cnt.fetch_add(1, atomics::SeqCst);
         if prev < 0 {
-            // Make sure we never overflow, we'll never have int::min_value
+            // Make sure we never overflow, we'll never have int::MIN
             // simultaneous calls to `doit` to make this value go back to 0
-            self.cnt.store(int::min_value, atomics::SeqCst);
+            self.cnt.store(int::MIN, atomics::SeqCst);
             return
         }
 
@@ -401,7 +401,7 @@ impl Once {
         unsafe { self.mutex.lock() }
         if self.cnt.load(atomics::SeqCst) > 0 {
             f();
-            let prev = self.cnt.swap(int::min_value, atomics::SeqCst);
+            let prev = self.cnt.swap(int::MIN, atomics::SeqCst);
             self.lock_cnt.store(prev, atomics::SeqCst);
         }
         unsafe { self.mutex.unlock() }