deprecate the <int type>_{MIN,MAX} constants - #5404
Conversation
|
Some changes occurred in an Android module cc @maurer |
| #[deprecated(since = "0.2.190", note = "Use `c_int::MIN` instead.")] | ||
| pub const INT_MIN: c_int = -1 - 0x7fffffff; | ||
| #[deprecated(since = "0.2.190", note = "Use `c_int::MAX` instead.")] | ||
| pub const INT_MAX: c_int = 0x7fffffff; |
There was a problem hiding this comment.
As part of this, would you mind changing the values to what we're suggesting to replace? E.g. pub const INT_MIN: c_int = c_int::MAX;
That way tests should pick up any cases where they don't match up.
There was a problem hiding this comment.
Done. I did move some values on 64-bit hurd, which I think were just wrong before. The *_FAST16/32 ones are c_long/ulong on that target and the pointer-width ones are isize/usize but all were written with 32-bit literals. One thing I'm a bit less sure on is that INTPTR_MIN/MAX and PTRDIFF_MIN/MAX needed their declared type moved to intptr_t/ptrdiff_t for this to compile since __intptr_t is c_long and won't unify with isize. If you'd rather I left those two alone let me know.
|
Reminder, once the PR becomes ready for a review, use |
|
Couldn't find qurt, solid, switch, xous, or 64-bit hurd in the CI anywhere, so I built them locally with @rustbot ready |
Follow-up to #5166. Deprecates the
<int type>_{MIN,MAX}constants across the platform modules, with notes pointing at the type's ownMIN/MAX.@rustbot label stable-nominated