refactor: remove *MAX constants fitting #3131#5147
Open
dybucc wants to merge 1 commit into
Open
Conversation
04dca5f to
92a4e90
Compare
*MAX constants fitting #3131
eb75c71 to
2fede99
Compare
This comment has been minimized.
This comment has been minimized.
This follows from rust-lang#5118, where all these symbols were deprecated. @JohnTitor then advised for their removal in a separate PR that was not on track to a stable release. There have been a few more symbols that had to be altogether removed because they relied on the now non-existent constants. See the accompanying PR for details.
Collaborator
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Contributor
Author
|
CI actually passes. There seems to be an issue with a glob import that is not used, but this has not |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR completely removes the symbols that were deprecated in #5122. This follows from the comments
by @JohnTitor in [1]. In this instance, removal implies both deletion in the souce file where the
constant is declared and purging of the corresponding symbols in the SemVer-tracking file.
There were a few symbols that did not have any SemVer plain text files tracking them. Those are
listed below. It is believed that some of these are actually tracked, only on a top-level module
like
unix, where removal in the corresponding source file (unix/mod.rs) would already count as afull deletion in other child modules (e.g.
unix/cygwin/mod.rs.) A second list with symbols thatwere previously annotated with an
allow(deprecated)but have now been altogether removed has alsobeen compiled further down. Some of those symbols are entire records and even FFI routines, so input
here would be appreciated.
PATH_MAXin Fuchsia (fuchsia/mod.rs.)J1939_FILTER_MAXin the Linux UAPI (new/linux_uapi/linux/can/j1939.rs.)LINK_MAXin QuRT (new/qurt/limits.rs.)NAME_MAXin QuRT (new/qurt/limits.rs.)PATH_MAXin QuRT (new/qurt/limits.rs.)SIGRTMAXin QuRT (new/qurt/signals.rs.)MAXPATHLENin the top-level BSD module (unix/bsd/mod.rs.)CPU_STATE_MAXin Apple (unix/bsd/apple/mod.rs.)vnode_info_pathin apple (unix/bsd/apple/mod.rs.)I'm not sure about removing whole records like this one, so input would be appreciated here.
IFSTATMAXin FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)proc_vnodepathinfoin apple (unix/bsd/apple/mod.rs.)I'm not sure about removing whole records like this one, so input would be appreciated here.
processor_cpu_load_infoin apple (unix/bsd/apple/mod.rs.)I'm not sure about removing whole records like this one, so input would be appreciated here.
processor_cpu_load_info_tin apple (unix/bsd/apple/mod.rs.)I'm not sure about removing pointers to whole records like this one, so input would be appreciated
here.
processor_cpu_load_info_data_tin apple (unix/bsd/apple/mod.rs.)I'm not sure about removing pointers to whole records like this one, so input would be appreciated
here.
PRI_MAXin FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)PRI_MAX_IDLEin FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)MAXINTERPin FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)NGROUPSin FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)NAME_MAXin FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)NGROUPS_MAXin FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)BC_BASE_MAXin FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)BC_DIM_MAXin FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)BC_SCALE_MAXin FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)BC_STRING_MAXin FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)CHARCLASS_NAME_MAXin FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)COLL_WEIGHTS_MAXin FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)EXPR_NEST_MAXin FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)LINE_MAXin FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)RE_DUP_MAXin FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)PR_SCTP_INVALID_POLICYin FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)PR_SCTP_VALID_POLICYin FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)ifstatin FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)I'm not sure about removing whole records like this one, so input would be appreciated here.
NGROUPS_MAXin NetBSD (unix/bsd/netbsdlike/netbsd/mod.rs.)PATH_MAXin Cygwin (unix/cygwin/mod.rs.)PATH_MAXin Haiku (unix/haiku/mod.rs.)B_PATH_NAME_LENGTHin Haiku (unix/haiku/native.rs.)PF_MAXin the GNU Hurd (unix/hurd/mod.rs.)PF_MAXin the GNU Hurd (unix/hurd/mod.rs.)AF_MAXin the GNU Hurd (unix/hurd/mod.rs.)NAME_MAXin the GNU Hurd (unix/hurd/mod.rs.)NGROUPS_MAXin the GNU Hurd (unix/hurd/mod.rs.)RTLD_DI_MAXin the GNU Hurd (unix/hurd/mod.rs.)PATH_MAXin Linux-like OSs (unix/linux_like/mod.rs.)KERN_PIDMAXin Android (unix/linux_like/android/mod.rs.)KERN_NGROUPS_MAXin Android (unix/linux_like/android/mod.rs.)SKF_AD_MAXin Linux (unix/linux_like/linux/mod.rs.)__NFT_REG_MAXin Linux (unix/linux_like/linux/mod.rs.)NFT_MSG_MAXin Linux (unix/linux_like/linux/mod.rs.)KERN_PIDMAXin Linux (unix/linux_like/linux/mod.rs.)KERN_NGROUPS_MAXin Linux (unix/linux_like/linux/mod.rs.)AF_MAXin 32-bits Hexagon with musl (unix/linux_like/linux/musl/b32/hexagon/mod.rs.)PF_MAXin 32-bits Hexagon with musl (unix/linux_like/linux/musl/b32/hexagon/mod.rs.)EAI_MAXinhorizon(unix/newlib/horizon/mod.rs.)SIGRTMAXin RTEMS (unix/newlib/rtems/mod.rs.)PATH_MAXin nto (unix/nto/mod.rs.)USER_BC_BASE_MAXin nto (unix/nto/mod.rs.)USER_BC_DIM_MAXin nto (unix/nto/mod.rs.)USER_BC_SCALE_MAXin nto (unix/nto/mod.rs.)USER_BC_STRING_MAXin nto (unix/nto/mod.rs.)USER_BC_COLL_WEIGHTS_MAXin nto (unix/nto/mod.rs.)USER_EXPR_NEST_MAXin nto (unix/nto/mod.rs.)USER_LINE_MAXin nto (unix/nto/mod.rs.)USER_RE_DUP_MAXin nto (unix/nto/mod.rs.)PATH_MAXin Redox (unix/redox/mod.rs.)FILNAME_MAXin Illumos (unix/solarish/illumos/mod.rs.)fil_infoin Illumos (unix/solarish/illumos/mod.rs.)I'm not sure about removing whole records like this one, so input would be appreciated here.
PATH_MAXin Solaris-like systems (unix/solarish/mod.rs.)_PTHREAD_SHARED_SEM_NAME_MAXin VxWorks (unix/vxworks/mod.rs.)AF_MAXin VxWorks (unix/vxworks/mod.rs.)_PARM_NAME_MAXin VxWorks (unix/vxworks/mod.rs.)_PARM_PATH_MAXin VxWorks (unix/vxworks/mod.rs.)readdir_rin VxWorks (unix/vxworks/mod.rs.)I'm not sure about removing whole FFI routines like this one, so input would be appreciated here.
pthread_rwlock_timedrdlockin VxWorks (unix/vxworks/mod.rs.)I'm not sure about removing whole FFI routines like this one, so input would be appreciated here.
pthread_rwlock_timedwrlockin VxWorks (unix/vxworks/mod.rs.)I'm not sure about removing whole FFI routines like this one, so input would be appreciated here.
pthread_mutex_timedlockin VxWorks (unix/vxworks/mod.rs.)I'm not sure about removing whole FFI routines like this one, so input would be appreciated here.
Due to some other constants relying on the now removed symbols, the following list contains the set
of symbols that had to be removed even though they were not strictly deprecated.
MAXPATHLENin the top-level BSD module (unix/bsd/mod.rs.)vnode_info_pathin apple (unix/bsd/apple/mod.rs.)I'm not sure about removing whole records like this one, so input would be appreciated here.
proc_vnodepathinfoin apple (unix/bsd/apple/mod.rs.)I'm not sure about removing whole records like this one, so input would be appreciated here.
host_cpu_load_infoin apple (unix/bsd/apple/mod.rs.)I'm not sure about removing whole records like this one, so input would be appreciated here.
processor_cpu_load_infoin apple (unix/bsd/apple/mod.rs.)I'm not sure about removing whole records like this one, so input would be appreciated here.
host_cpu_load_info_tin apple (unix/bsd/apple/mod.rs.)I'm not sure about removing pointers to whole records like this one, so input would be appreciated
here.
host_cpu_load_info_data_tin apple (unix/bsd/apple/mod.rs.)I'm not sure about removing pointers to whole records like this one, so input would be appreciated
here.
processor_cpu_load_info_tin apple (unix/bsd/apple/mod.rs.)I'm not sure about removing pointers to whole records like this one, so input would be appreciated
here.
processor_cpu_load_info_data_tin apple (unix/bsd/apple/mod.rs.)I'm not sure about removing pointers to whole records like this one, so input would be appreciated
here.
PRI_MAX_IDLEin FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)MAXINTERPin FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)NGROUPSin FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)PR_SCTP_INVALID_POLICYin FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)PR_SCTP_VALID_POLICYin FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)kinfo_vmentryin FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)I'm not sure about removing whole records like this one, so input would be appreciated here.
tcp_function_setin FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)I'm not sure about removing whole records like this one, so input would be appreciated here.
ifstatin FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)I'm not sure about removing whole records like this one, so input would be appreciated here.
kinfo_filein FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)I'm not sure about removing whole records like this one, so input would be appreciated here.
kinfo_getvmmapin FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)I'm not sure about removing whole FFI routines like this one, so input would be appreciated here.
procstat_getvmmapin FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)I'm not sure about removing whole FFI routines like this one, so input would be appreciated here.
procstat_freevmmapin FreeBSD (unix/bsd/freebsdlike/freebsd/mod.rs.)I'm not sure about removing whole FFI routines like this one, so input would be appreciated here.
uucredin NetBSD (unix/bsd/netbsdlike/netbsd/mod.rs.)I'm not sure about removing whole records like this one, so input would be appreciated here.
kinfo_vmentryin NetBSD (unix/bsd/netbsdlike/netbsd/mod.rs.)I'm not sure about removing whole records like this one, so input would be appreciated here.
kinfo_getvmmapin NetBSD (unix/bsd/netbsdlike/netbsd/mod.rs.)I'm not sure about removing whole FFI routines like this one, so input would be appreciated here.
FF_CNTin Android (unix/linux_like/android/mod.rs.)INPUT_PROP_CNTin Android (unix/linux_like/android/mod.rs.)EV_CNTin Android (unix/linux_like/android/mod.rs.)SYN_CNTin Android (unix/linux_like/android/mod.rs.)KEY_CNTin Android (unix/linux_like/android/mod.rs.)REL_CNTin Android (unix/linux_like/android/mod.rs.)ABS_CNTin Android (unix/linux_like/android/mod.rs.)SW_CNTin Android (unix/linux_like/android/mod.rs.)MSC_CNTin Android (unix/linux_like/android/mod.rs.)LED_CNTin Android (unix/linux_like/android/mod.rs.)REP_CNTin Android (unix/linux_like/android/mod.rs.)SND_CNTin Android (unix/linux_like/android/mod.rs.)uinput_user_devin Android (unix/linux_like/android/mod.rs.)I'm not sure about removing whole records like this one, so input would be appreciated here.
FF_CNTin Linux (unix/linux_like/linux/mod.rs.)INPUT_PROP_CNTin Linux (unix/linux_like/linux/mod.rs.)EV_CNTin Linux (unix/linux_like/linux/mod.rs.)SYN_CNTin Linux (unix/linux_like/linux/mod.rs.)KEY_CNTin Linux (unix/linux_like/linux/mod.rs.)REL_CNTin Linux (unix/linux_like/linux/mod.rs.)ABS_CNTin Linux (unix/linux_like/linux/mod.rs.)SW_CNTin Linux (unix/linux_like/linux/mod.rs.)MSC_CNTin Linux (unix/linux_like/linux/mod.rs.)LED_CNTin Linux (unix/linux_like/linux/mod.rs.)REP_CNTin Linux (unix/linux_like/linux/mod.rs.)SND_CNTin Linux (unix/linux_like/linux/mod.rs.)uinput_user_devin Linux (unix/linux_like/linux/mod.rs.)I'm not sure about removing whole records like this one, so input would be appreciated here.
fil_infoin Illumos (unix/solarish/illumos/mod.rs.)I'm not sure about removing whole records like this one, so input would be appreciated here.
direntin VxWorks (unix/vxworks/mod.rs.)I'm not sure about removing whole records like this one, so input would be appreciated here.
PTHREAD_MUTEX_INITIALIZERin VxWorks (unix/vxworks/mod.rs.)PTHREAD_COND_INITIALIZERin VxWorks (unix/vxworks/mod.rs.)PTHREAD_RWLOCK_INITIALIZERin VxWorks (unix/vxworks/mod.rs.)pthread_cont_tin VxWorks (unix/vxworks/mod.rs.)I'm not sure about removing whole records like this one, so input would be appreciated here.
pthread_cond_initin VxWorks (unix/vxworks/mod.rs.)I'm not sure about removing whole FFI routines like this one, so input would be appreciated here.
pthread_cond_signalin VxWorks (unix/vxworks/mod.rs.)I'm not sure about removing whole FFI routines like this one, so input would be appreciated here.
pthread_cond_broadcastin VxWorks (unix/vxworks/mod.rs.)I'm not sure about removing whole FFI routines like this one, so input would be appreciated here.
pthread_cond_destroyin VxWorks (unix/vxworks/mod.rs.)I'm not sure about removing whole FFI routines like this one, so input would be appreciated here.
pthread_cond_waitin VxWorks (unix/vxworks/mod.rs.)I'm not sure about removing whole FFI routines like this one, so input would be appreciated here.
pthread_cond_timedwaitin VxWorks (unix/vxworks/mod.rs.)I'm not sure about removing whole FFI routines like this one, so input would be appreciated here.
readdir_rin VxWorks (unix/vxworks/mod.rs.)I'm not sure about removing whole FFI routines like this one, so input would be appreciated here.
pthread_rwlock_tin VxWorks (unix/vxworks/mod.rs.)I'm not sure about removing whole records like this one, so input would be appreciated here.
pthread_rwlock_initin VxWorks (unix/vxworks/mod.rs.)I'm not sure about removing whole FFI routines like this one, so input would be appreciated here.
pthread_rwlock_destroyin VxWorks (unix/vxworks/mod.rs.)I'm not sure about removing whole FFI routines like this one, so input would be appreciated here.
pthread_rwlock_rdlockin VxWorks (unix/vxworks/mod.rs.)I'm not sure about removing whole FFI routines like this one, so input would be appreciated here.
pthread_rwlock_tryrdlockin VxWorks (unix/vxworks/mod.rs.)I'm not sure about removing whole FFI routines like this one, so input would be appreciated here.
pthread_rwlock_timedrdlockin VxWorks (unix/vxworks/mod.rs.)I'm not sure about removing whole FFI routines like this one, so input would be appreciated here.
pthread_rwlock_wrlockin VxWorks (unix/vxworks/mod.rs.)I'm not sure about removing whole FFI routines like this one, so input would be appreciated here.
pthread_rwlock_trywrlockin VxWorks (unix/vxworks/mod.rs.)I'm not sure about removing whole FFI routines like this one, so input would be appreciated here.
pthread_rwlock_timedwrlockin VxWorks (unix/vxworks/mod.rs.)I'm not sure about removing whole FFI routines like this one, so input would be appreciated here.
pthread_rwlock_unlockin VxWorks (unix/vxworks/mod.rs.)I'm not sure about removing whole FFI routines like this one, so input would be appreciated here.
pthread_mutex_tin VxWorks (unix/vxworks/mod.rs.)I'm not sure about removing whole records like this one, so input would be appreciated here.
pthread_mutex_initin VxWorks (unix/vxworks/mod.rs.)I'm not sure about removing whole FFI routines like this one, so input would be appreciated here.
pthread_mutex_destroyin VxWorks (unix/vxworks/mod.rs.)I'm not sure about removing whole FFI routines like this one, so input would be appreciated here.
pthread_mutex_lockin VxWorks (unix/vxworks/mod.rs.)I'm not sure about removing whole FFI routines like this one, so input would be appreciated here.
pthread_mutex_trylockin VxWorks (unix/vxworks/mod.rs.)I'm not sure about removing whole FFI routines like this one, so input would be appreciated here.
pthread_mutex_timedlockin VxWorks (unix/vxworks/mod.rs.)I'm not sure about removing whole FFI routines like this one, so input would be appreciated here.
pthread_mutex_unlockin VxWorks (unix/vxworks/mod.rs.)I'm not sure about removing whole FFI routines like this one, so input would be appreciated here.
Sources
See #5122.
Checklist
libc-test/semverhave been updated*LASTor*MAXareincluded (see #3131)
cd libc-test && cargo test --target mytarget);especially relevant for platforms that may not be checked in CI