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

Mark unsafe methods NonZero*::unchecked_(add|mul) as const. #87910

Merged
merged 1 commit into from
Oct 4, 2021
Merged

Mark unsafe methods NonZero*::unchecked_(add|mul) as const. #87910

merged 1 commit into from
Oct 4, 2021

Conversation

iago-lito
Copy link
Contributor

Now that rust-lang/rfcs#3016 has landed, these two unstable std function can be marked const, according to this detail of #84186.

@rust-highfive
Copy link
Collaborator

r? @joshtriplett

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 10, 2021
@iago-lito
Copy link
Contributor Author

iago-lito commented Aug 11, 2021

(oh, maybe I have to write this?)

r? @poliorcetics
r? @m-ou-se

@poliorcetics
Copy link
Contributor

poliorcetics commented Aug 11, 2021

There can only be one reviewer I think ?

Anyway, the changes look good, though I don't have the permissions to r+

@jackh726 jackh726 added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Aug 23, 2021
@JohnCSimon JohnCSimon added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 12, 2021
@LingMan
Copy link
Contributor

LingMan commented Sep 19, 2021

Might be a good idea to s/unsafe_checked/unchecked/ in both the commit message and the PR title.

@iago-lito iago-lito changed the title Mark NonZero*::unsafe_checked_(add|mul) as const. Mark unsafe methods NonZero*::unchecked_(add|mul) as const. Sep 20, 2021
@joshtriplett
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Oct 4, 2021

📌 Commit 74c4c01 has been approved by joshtriplett

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 4, 2021
Manishearth added a commit to Manishearth/rust that referenced this pull request Oct 4, 2021
…metics_as_const, r=joshtriplett

Mark unsafe methods NonZero*::unchecked_(add|mul) as const.

Now that rust-lang/rfcs#3016 has landed, these two unstable `std` function can be marked `const`, according to this detail of rust-lang#84186.
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 4, 2021
…arth

Rollup of 14 pull requests

Successful merges:

 - rust-lang#86434 (Add `Ipv6Addr::is_benchmarking`)
 - rust-lang#86828 (const fn for option copied, take & replace)
 - rust-lang#87679 (BTree: refine some comments)
 - rust-lang#87910 (Mark unsafe methods NonZero*::unchecked_(add|mul) as const.)
 - rust-lang#88286 (Remove unnecessary unsafe block in `process_unix`)
 - rust-lang#88305 (Manual Debug for Unix ExitCode ExitStatus ExitStatusError)
 - rust-lang#88353 (Partially stabilize `array_methods`)
 - rust-lang#88370 (Add missing `# Panics` section to `Vec` method)
 - rust-lang#88481 (Remove some feature gates)
 - rust-lang#89138 (Fix link in Ipv6Addr::to_ipv4 docs)
 - rust-lang#89401 (Add truncate note to Vec::resize)
 - rust-lang#89467 (Fix typos in rustdoc/lints)
 - rust-lang#89472 (Only register `WSACleanup` if `WSAStartup` is actually ever called)
 - rust-lang#89505 (Add regression test for spurious const error with NLL)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e500f1c into rust-lang:master Oct 4, 2021
@rustbot rustbot added this to the 1.57.0 milestone Oct 4, 2021
@iago-lito iago-lito deleted the mark_unsafe_nonzero_arithmetics_as_const branch October 4, 2021 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants