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 Index{,Mut} for [T], str, and [T; N] #94657

Merged
merged 2 commits into from
Mar 10, 2022

Conversation

fee1-dead
Copy link
Member

Several panic functions were rewired (via const_eval_select) to simpler implementations that do not require formatting for compile-time usage.

r? @oli-obk

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 6, 2022
@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 6, 2022
@oli-obk oli-obk added the S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. label Mar 6, 2022
@oli-obk
Copy link
Contributor

oli-obk commented Mar 6, 2022

Hold up 😄 I got like 5 PRs in my review queue that are blocked on the nebulous "unclear if libs and lang are happy with our extensive testing here".

I really want to progress, so maybe you and I should come up with a less technical doc and a more "here's what users want to do and how they can do it now and how they can do it with 🌈🦄-const-eval"

@oli-obk oli-obk added const-hack and removed S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. labels Mar 9, 2022
@oli-obk
Copy link
Contributor

oli-obk commented Mar 9, 2022

ok, went through the queue and this PR. Since it does not add new bounds, there are no rustdoc or diagnostics visible changes. The const_eval_select is unfortunate but ok. Maybe we can figure out how to make const Display for integers work ^^

@bors r+

@bors
Copy link
Contributor

bors commented Mar 9, 2022

📌 Commit 4654a91 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 Mar 9, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Mar 9, 2022
Constify `Index{,Mut}` for `[T]`, `str`, and `[T; N]`

Several panic functions were rewired (via `const_eval_select`) to simpler implementations that do not require formatting for compile-time usage.

r? ``@oli-obk``
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 10, 2022
…askrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#92150 (Improve suggestion when casting usize to (possibly) wide pointer)
 - rust-lang#94635 (Merge `#[deprecated]` and `#[rustc_deprecated]`)
 - rust-lang#94657 (Constify `Index{,Mut}` for `[T]`, `str`, and `[T; N]`)
 - rust-lang#94746 (diagnostics: use rustc_on_unimplemented to recommend `[].iter()`)
 - rust-lang#94788 (Account for suggestions for complete removal of lines)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit fe034cb into rust-lang:master Mar 10, 2022
@rustbot rustbot added this to the 1.61.0 milestone Mar 10, 2022
@fee1-dead fee1-dead deleted the const_slice_index branch March 13, 2022 03:16
yvt added a commit to r3-os/r3 that referenced this pull request Mar 21, 2022
This feature, which covers the `const fn` version of `<[T]>::
get[_unchecked][_mut]`, was added by [rust-lang/rust#94657][1].

[1]: rust-lang/rust#94657
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-compiler Relevant to the compiler 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