-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Add a note saying that {u8,i8}::from_{be,le,ne}_bytes
is meaningless
#134079
base: master
Are you sure you want to change the base?
Conversation
66b32cf
to
7548135
Compare
I think saying "no-op" would be better than "useless". It does have a purpose, after all (primarily macros). |
r? jhpratt |
It's not really a no-op, it's taking the byte and putting it into an array. The function name (or documentation or doctest) doesn't really make sense for I doubt the existence of them was even thought about when initially introducing them. Looking at the git blame, it was apparently me who added them. :D #51919. I think it's only an accident that they exist on I'm open for another word that describes that the function's names already convey nonsensical behavior, but I think "no-op" is not it. |
True, I spoke too quickly. In any situation, "useless" probably isn't the right word here. I don't have any concrete alternatives off-hand. |
7548135
to
1f64f99
Compare
{u8,i8}::from_{be,le,ne}_bytes
is useless{u8,i8}::from_{be,le,ne}_bytes
is meaningless
Changed to "meaningless". |
Might want to double check, as it doesn't look like that actually happened 🙂 |
@bors delegate+ |
1f64f99
to
e37d7c0
Compare
…=jhpratt Add a note saying that `{u8,i8}::from_{be,le,ne}_bytes` is meaningless
Rollup of 8 pull requests Successful merges: - rust-lang#134079 (Add a note saying that `{u8,i8}::from_{be,le,ne}_bytes` is meaningless) - rust-lang#134105 (Validate self in host predicates correctly) - rust-lang#134136 (Exercise const trait interaction with default fields) - rust-lang#134139 ([AIX] keep profile-rt symbol alive) - rust-lang#134141 (Remove more traces of anonymous ADTs) - rust-lang#134142 (Rudimentary heuristic to insert parentheses when needed for RPIT overcaptures lint) - rust-lang#134158 (Rename `projection_def_id` to `item_def_id`) - rust-lang#134160 (Add vacation entry for myself in triagebot.toml) r? `@ghost` `@rustbot` modify labels: rollup
No description provided.