Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the type of constants BYTES/BITS to usize #23832

Merged
merged 3 commits into from
Apr 3, 2015

Conversation

petrochenkov
Copy link
Contributor

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

@bors
Copy link
Contributor

bors commented Mar 29, 2015

☔ The latest upstream changes (presumably #23831) made this pull request unmergeable. Please resolve the merge conflicts.

@aturon
Copy link
Member

aturon commented Apr 3, 2015

Sorry for the delay in reviewing this! Looks good to me.

@bors: r+ 883adc6

@bors
Copy link
Contributor

bors commented Apr 3, 2015

⌛ Testing commit 883adc6 with merge fc98b19...

bors added a commit that referenced this pull request Apr 3, 2015
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
@bors bors merged commit 883adc6 into rust-lang:master Apr 3, 2015
@petrochenkov petrochenkov deleted the usize branch May 9, 2015 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants