diff options
| author | Chris Wong <lambda.fairy@gmail.com> | 2014-01-25 20:37:51 +1300 |
|---|---|---|
| committer | Chris Wong <lambda.fairy@gmail.com> | 2014-01-25 21:38:25 +1300 |
| commit | 988e4f0a1c2802921375271bdc19f03650c024d2 (patch) | |
| tree | b2d2913ca7575e8e52f2cf6e7975ca2f0f148286 /src/libstd/num/uint.rs | |
| parent | de57a22b9a8c8416cace31c9bd3ec4c9a6888017 (diff) | |
| download | rust-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/num/uint.rs')
| -rw-r--r-- | src/libstd/num/uint.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libstd/num/uint.rs b/src/libstd/num/uint.rs index d304f947542..3eeae6283b3 100644 --- a/src/libstd/num/uint.rs +++ b/src/libstd/num/uint.rs @@ -1,4 +1,4 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -25,7 +25,7 @@ use option::{Option, Some, None}; use str; use unstable::intrinsics; -uint_module!(uint, int, ::int::bits) +uint_module!(uint, int, ::int::BITS) /// /// Divide two numbers, return the result, rounded up. @@ -234,9 +234,9 @@ fn test_next_power_of_two() { #[test] fn test_overflows() { use uint; - assert!((uint::max_value > 0u)); - assert!((uint::min_value <= 0u)); - assert!((uint::min_value + uint::max_value + 1u == 0u)); + assert!((uint::MAX > 0u)); + assert!((uint::MIN <= 0u)); + assert!((uint::MIN + uint::MAX + 1u == 0u)); } #[test] |
