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

Stabilize [T; N]::map() #87174

Merged
merged 1 commit into from
Jul 16, 2021
Merged

Stabilize [T; N]::map() #87174

merged 1 commit into from
Jul 16, 2021

Conversation

inquisitivecrystal
Copy link
Contributor

This stabilizes the [T; N]::map() function, gated by the array_map feature. The FCP has already completed.

Closes #75243.

@rust-highfive
Copy link
Collaborator

r? @kennytm

(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 Jul 15, 2021
@jonas-schievink jonas-schievink added relnotes Marks issues that should be documented in the release notes of the next release. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jul 15, 2021
@kennytm kennytm mentioned this pull request Jul 16, 2021
4 tasks
@kennytm
Copy link
Member

kennytm commented Jul 16, 2021

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jul 16, 2021

📌 Commit 7fc4fc7 has been approved by kennytm

@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 Jul 16, 2021
@bors
Copy link
Contributor

bors commented Jul 16, 2021

⌛ Testing commit 7fc4fc7 with merge 731911e62314329744ecf86ce612835018747d4c...

@bors
Copy link
Contributor

bors commented Jul 16, 2021

💔 Test failed - checks-actions

@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 16, 2021
@Aaron1011
Copy link
Member

@bors retry

@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 Jul 16, 2021
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jul 16, 2021
…nytm

Stabilize `[T; N]::map()`

This stabilizes the `[T; N]::map()` function, gated by the `array_map` feature. The FCP has [already completed.](rust-lang#75243 (comment))

Closes rust-lang#75243.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 16, 2021
…laumeGomez

Rollup of 7 pull requests

Successful merges:

 - rust-lang#87107 (Loop over all opaque types instead of looking at just the first one with the same DefId)
 - rust-lang#87158 (Suggest full enum variant for local modules)
 - rust-lang#87174 (Stabilize `[T; N]::map()`)
 - rust-lang#87179 (Mark `const_trait_impl` as active)
 - rust-lang#87180 (feat(rustdoc): open sidebar menu when links inside it are focused)
 - rust-lang#87188 (Add GUI test for auto-hide-trait-implementations setting)
 - rust-lang#87200 (TAIT: Infer all inference variables in opaque type substitutions via InferCx)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 7c5cabe into rust-lang:master Jul 16, 2021
@rustbot rustbot added this to the 1.55.0 milestone Jul 16, 2021
bors added a commit to rust-lang/hashbrown that referenced this pull request Jul 19, 2021
Replace some custom unsafe code with `array::map`

`<[T; N]>::map` was recently stabilized (rust-lang/rust#87174). It's not on any stable or beta yet, but we're only using it here with `cfg(feature = "nightly")` (in the functions `HashMap::get_each_mut` and `HashMap::get_each_key_value_mut`).
@jplatte jplatte mentioned this pull request Jul 22, 2021
65 tasks
bors bot added a commit to rust-lang/rust-analyzer that referenced this pull request Sep 8, 2021
10180: Fix resolution for inherent array methods r=flodiebold a=yotamofek

My second attempt at fixing #9992 , previous attempt was here: #10017 , but the logic was broken.

I know that this is not an ideal solution.... that would require, IIUC, a pretty big overhaul of the const generics handling in `rust-analyzer`. But, given that some of the array methods were/are being stabilized (e.g. rust-lang/rust#87174 ), I think it'll be very beneficial to `rust-analyzer` users to have some preliminary support for them. (I know it's something I've been running into quite a lot lately :) )

As far as my limited understanding of this project's architecture goes, I think this isn't the worst hack in the world, and shouldn't be too much of a hassle to undo if/when const generics become better supported. If the maintainers deem this approach viable, I'll want to add some comments, emphasizing the purpose of this code, and that it should be removed at some point in the future.

Co-authored-by: Yotam Ofek <yotam.ofek@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tracking Issue for array_map
8 participants