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
This commit is contained in:
bors 2015-04-03 04:29:52 +00:00
commit fc98b19cf7
14 changed files with 86 additions and 86 deletions

View file

@ -14,7 +14,7 @@
use std::u8;
const NUM: usize = u8::BITS as usize;
const NUM: usize = u8::BITS;
struct MyStruct { nums: [usize; 8] }

View file

@ -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 {