Skip to content

std::int::min_value, max_value, etc. should be capitalized #10010

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

Closed
brson opened this issue Oct 22, 2013 · 5 comments · Fixed by #11790
Closed

std::int::min_value, max_value, etc. should be capitalized #10010

brson opened this issue Oct 22, 2013 · 5 comments · Fixed by #11790
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Milestone

Comments

@brson
Copy link
Contributor

brson commented Oct 22, 2013

Not sure why they are lowercase.

@brson
Copy link
Contributor Author

brson commented Oct 22, 2013

Nominating.

@catamorphism
Copy link
Contributor

1.0, backcompat

berleon pushed a commit to berleon/rust that referenced this issue Nov 11, 2013
@lambda-fairy
Copy link
Contributor

@berleon, are you still working on this? I'll be happy to pick up where you left off.

@brson
Copy link
Contributor Author

brson commented Jan 18, 2014

@lfairy Have a go at it.

@lambda-fairy
Copy link
Contributor

@brson I've noticed in std::char, the constant is named simply MAX, with no _VALUE suffix. Should I match this convention?

Now that I think about it, I prefer the shorter MIN and MAX actually. They'll end up referred as e.g. int::MAX, which looks a lot like INT_MAX in C. I think the main reason we kept the suffixes was to prevent confusion with the min and max functions; capitalizing the constants makes this a non-issue.

bors added a commit that referenced this issue Jan 25, 2014
The following are renamed:

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

All tests pass, except for `run-pass/phase-syntax-link-does-resolve.rs`. I doubt that failure is related, though.

Fixes #10010.
@bors bors closed this as completed in 988e4f0 Jan 25, 2014
nathanielherman pushed a commit to nathanielherman/rust that referenced this issue Jan 30, 2014
The following are renamed:

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

Fixes rust-lang#10010.
flip1995 pushed a commit to flip1995/rust that referenced this issue Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants