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

Constify bool::then{,_some} #91918

Conversation

fee1-dead
Copy link
Member

Note on ~const Drop: it has no effect when called from runtime functions, when called from const contexts, the trait system ensures that the type can be dropped in const contexts.

@fee1-dead fee1-dead added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. F-const_trait_impl `#![feature(const_trait_impl)]` labels Dec 14, 2021
@rust-highfive
Copy link
Collaborator

r? @dtolnay

(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 Dec 14, 2021
@fee1-dead
Copy link
Member Author

r? @oli-obk

@rust-highfive rust-highfive assigned oli-obk and unassigned dtolnay Dec 14, 2021
@oli-obk
Copy link
Contributor

oli-obk commented Dec 14, 2021

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Dec 14, 2021

📌 Commit 4f4b2c7 has been approved by oli-obk

@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 Dec 14, 2021
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 14, 2021
…-constification-begins, r=oli-obk

Constify `bool::then{,_some}`

Note on `~const Drop`: it has no effect when called from runtime functions, when called from const contexts, the trait system ensures that the type can be dropped in const contexts.
This was referenced Dec 14, 2021
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 15, 2021
…-constification-begins, r=oli-obk

Constify `bool::then{,_some}`

Note on `~const Drop`: it has no effect when called from runtime functions, when called from const contexts, the trait system ensures that the type can be dropped in const contexts.
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 15, 2021
…askrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#91880 (fix clippy::single_char_pattern perf findings)
 - rust-lang#91885 (Remove `in_band_lifetimes` from `rustc_codegen_ssa`)
 - rust-lang#91898 (Make `TyS::is_suggestable` check for non-suggestable types structually)
 - rust-lang#91915 (Add another regression test for unnormalized fn args with Self)
 - rust-lang#91916 (Fix a bunch of typos)
 - rust-lang#91918 (Constify `bool::then{,_some}`)
 - rust-lang#91920 (Use `tcx.def_path_hash` in `ExistentialPredicate.stable_cmp`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 13fb051 into rust-lang:master Dec 15, 2021
@rustbot rustbot added this to the 1.59.0 milestone Dec 15, 2021
@fee1-dead fee1-dead deleted the constification0-the-great-constification-begins branch March 6, 2022 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-const_trait_impl `#![feature(const_trait_impl)]` 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.

6 participants