diff options
| author | bors <bors@rust-lang.org> | 2015-04-03 04:29:52 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-04-03 04:29:52 +0000 |
| commit | fc98b19cf72ea45851ebb7b28af160be92b19128 (patch) | |
| tree | 8a19d8c1f6e9a71eb5e0286954519b4b7ec3fbf8 /src/test | |
| parent | 5e30f05a05326018357c6fffdfb872e8a8d2367c (diff) | |
| parent | 883adc6763c3dd06b282368698b28a07cdd65fd6 (diff) | |
| download | rust-fc98b19cf72ea45851ebb7b28af160be92b19128.tar.gz rust-fc98b19cf72ea45851ebb7b28af160be92b19128.zip | |
Auto merge of #23832 - petrochenkov:usize, r=aturon
These constants are small and can fit even in `u8`, but semantically they have type `usize` because they denote sizes and are almost always used in `usize` context. The change of their type to `u32` during the integer audit led only to the large amount of `as usize` noise (see the second commit, which removes this noise). This is a minor [breaking-change] to an unstable interface. r? @aturon
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/issue-13763.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/vector-sort-panic-safe.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/test/run-pass/issue-13763.rs b/src/test/run-pass/issue-13763.rs index fb82cccc871..e11270c94ca 100644 --- a/src/test/run-pass/issue-13763.rs +++ b/src/test/run-pass/issue-13763.rs @@ -14,7 +14,7 @@ use std::u8; -const NUM: usize = u8::BITS as usize; +const NUM: usize = u8::BITS; struct MyStruct { nums: [usize; 8] } diff --git a/src/test/run-pass/vector-sort-panic-safe.rs b/src/test/run-pass/vector-sort-panic-safe.rs index 09ecdf45b93..eca7e62d67c 100644 --- a/src/test/run-pass/vector-sort-panic-safe.rs +++ b/src/test/run-pass/vector-sort-panic-safe.rs @@ -57,7 +57,7 @@ impl Drop for DropCounter { } pub fn main() { - assert!(MAX_LEN <= std::usize::BITS as usize); + assert!(MAX_LEN <= std::usize::BITS); // len can't go above 64. for len in 2..MAX_LEN { for _ in 0..REPEATS { |
