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

Tracking issue for const Pin methods #76654

Open
CDirkx opened this issue Sep 12, 2020 · 9 comments
Open

Tracking issue for const Pin methods #76654

CDirkx opened this issue Sep 12, 2020 · 9 comments
Labels
A-const-eval Area: Constant evaluation, covers all const contexts (static, const fn, ...) disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@CDirkx
Copy link
Contributor

CDirkx commented Sep 12, 2020

Constify methods of core::pin::Pin under the feature const_pin.

Implementation: #76655

Methods in const_pin (stable since #130136):

  • new
  • new_unchecked
  • get_ref
  • into_ref
  • get_mut
  • get_unchecked_mut
  • static_ref
  • static_mut

Methods in const_pin2:

  • into_inner
  • into_inner_unchecked

The const_pin2 methods will need #[rustc_allow_const_fn_unstable(const_precise_live_drops)] but that has been approved here.

CDirkx added a commit to CDirkx/rust that referenced this issue Sep 12, 2020
Make the following methods unstable const under the `const_pin` feature:
- `new`
- `new_unchecked`
- `into_inner`
- `into_inner_unchecked`
- `get_ref`
- `into_ref`

Also adds tests for these methods in a const context.

Tracking issue: rust-lang#76654
@jyn514 jyn514 added A-const-fn T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Sep 13, 2020
@ecstatic-morse
Copy link
Contributor

As you mention in #76655 PR, the implementation of some of these methods depends on the unstable const_precise_live_drops feature. Future readers should check the status of that feature before attempting to stabilize these. #76618 will ensure that this does not happen by accident.

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Sep 19, 2020
Make some methods of `Pin` unstable const

Make the following methods unstable const under the `const_pin` feature:
- `new`
- `new_unchecked`
- `into_inner`
- `into_inner_unchecked`
- `get_ref`
- `into_ref`
- `get_mut`
- `get_unchecked_mut`

Of these, `into_inner` and `into_inner_unchecked` require the unstable `const_precise_live_drops`.

Also adds tests for these methods in a const context.

Tracking issue: rust-lang#76654

r? @ecstatic-morse
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Sep 19, 2020
Make some methods of `Pin` unstable const

Make the following methods unstable const under the `const_pin` feature:
- `new`
- `new_unchecked`
- `into_inner`
- `into_inner_unchecked`
- `get_ref`
- `into_ref`
- `get_mut`
- `get_unchecked_mut`

Of these, `into_inner` and `into_inner_unchecked` require the unstable `const_precise_live_drops`.

Also adds tests for these methods in a const context.

Tracking issue: rust-lang#76654

r? @ecstatic-morse
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Sep 19, 2020
Make some methods of `Pin` unstable const

Make the following methods unstable const under the `const_pin` feature:
- `new`
- `new_unchecked`
- `into_inner`
- `into_inner_unchecked`
- `get_ref`
- `into_ref`
- `get_mut`
- `get_unchecked_mut`

Of these, `into_inner` and `into_inner_unchecked` require the unstable `const_precise_live_drops`.

Also adds tests for these methods in a const context.

Tracking issue: rust-lang#76654

r? @ecstatic-morse
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Sep 20, 2020
Make some methods of `Pin` unstable const

Make the following methods unstable const under the `const_pin` feature:
- `new`
- `new_unchecked`
- `into_inner`
- `into_inner_unchecked`
- `get_ref`
- `into_ref`
- `get_mut`
- `get_unchecked_mut`

Of these, `into_inner` and `into_inner_unchecked` require the unstable `const_precise_live_drops`.

Also adds tests for these methods in a const context.

Tracking issue: rust-lang#76654

r? @ecstatic-morse
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Sep 21, 2020
Make some methods of `Pin` unstable const

Make the following methods unstable const under the `const_pin` feature:
- `new`
- `new_unchecked`
- `into_inner`
- `into_inner_unchecked`
- `get_ref`
- `into_ref`
- `get_mut`
- `get_unchecked_mut`

Of these, `into_inner` and `into_inner_unchecked` require the unstable `const_precise_live_drops`.

Also adds tests for these methods in a const context.

Tracking issue: rust-lang#76654

r? @ecstatic-morse
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Sep 21, 2020
Make some methods of `Pin` unstable const

Make the following methods unstable const under the `const_pin` feature:
- `new`
- `new_unchecked`
- `into_inner`
- `into_inner_unchecked`
- `get_ref`
- `into_ref`
- `get_mut`
- `get_unchecked_mut`

Of these, `into_inner` and `into_inner_unchecked` require the unstable `const_precise_live_drops`.

Also adds tests for these methods in a const context.

Tracking issue: rust-lang#76654

r? @ecstatic-morse
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Sep 22, 2020
Make some methods of `Pin` unstable const

Make the following methods unstable const under the `const_pin` feature:
- `new`
- `new_unchecked`
- `into_inner`
- `into_inner_unchecked`
- `get_ref`
- `into_ref`
- `get_mut`
- `get_unchecked_mut`

Of these, `into_inner` and `into_inner_unchecked` require the unstable `const_precise_live_drops`.

Also adds tests for these methods in a const context.

Tracking issue: rust-lang#76654

r? @ecstatic-morse
ecstatic-morse added a commit to ecstatic-morse/rust that referenced this issue Sep 22, 2020
Make some methods of `Pin` unstable const

Make the following methods unstable const under the `const_pin` feature:
- `new`
- `new_unchecked`
- `into_inner`
- `into_inner_unchecked`
- `get_ref`
- `into_ref`
- `get_mut`
- `get_unchecked_mut`

Of these, `into_inner` and `into_inner_unchecked` require the unstable `const_precise_live_drops`.

Also adds tests for these methods in a const context.

Tracking issue: rust-lang#76654

r? @ecstatic-morse
ecstatic-morse added a commit to ecstatic-morse/rust that referenced this issue Sep 22, 2020
Make some methods of `Pin` unstable const

Make the following methods unstable const under the `const_pin` feature:
- `new`
- `new_unchecked`
- `into_inner`
- `into_inner_unchecked`
- `get_ref`
- `into_ref`
- `get_mut`
- `get_unchecked_mut`

Of these, `into_inner` and `into_inner_unchecked` require the unstable `const_precise_live_drops`.

Also adds tests for these methods in a const context.

Tracking issue: rust-lang#76654

r? @ecstatic-morse
jhpratt added a commit to jhpratt/rust that referenced this issue Oct 18, 2024
Partially stabilize const_pin

Tracking issue rust-lang#76654.

Eight of these methods can be made const-stable. The remainder are blocked on rust-lang#73255.
jhpratt added a commit to jhpratt/rust that referenced this issue Oct 18, 2024
Partially stabilize const_pin

Tracking issue rust-lang#76654.

Eight of these methods can be made const-stable. The remainder are blocked on rust-lang#73255.
jhpratt added a commit to jhpratt/rust that referenced this issue Oct 18, 2024
Partially stabilize const_pin

Tracking issue rust-lang#76654.

Eight of these methods can be made const-stable. The remainder are blocked on rust-lang#73255.
jieyouxu added a commit to jieyouxu/rust that referenced this issue Oct 18, 2024
Partially stabilize const_pin

Tracking issue rust-lang#76654.

Eight of these methods can be made const-stable. The remainder are blocked on rust-lang#73255.
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Oct 18, 2024
Rollup merge of rust-lang#130136 - GKFX:stabilize-const-pin, r=dtolnay

Partially stabilize const_pin

Tracking issue rust-lang#76654.

Eight of these methods can be made const-stable. The remainder are blocked on rust-lang#73255.
@RalfJung
Copy link
Member

RalfJung commented Oct 18, 2024

@dtolnay wrote

I'd be happy to take a separate PR for the const-stabilizing of into_inner + into_inner_unchecked. Procedurally I think a fresh FCP would be required.

So, let's get that train rolling -- @rust-lang/libs-api can we const-stabilize the const_pin2 feature gate, which guards Pin::into_inner and Pin::into_inner_unchecked (already stable outside const)?

@RalfJung RalfJung added the I-libs-api-nominated Nominated for discussion during a libs-api team meeting. label Oct 18, 2024
@dtolnay
Copy link
Member

dtolnay commented Oct 18, 2024

@rfcbot fcp merge

@rfcbot
Copy link

rfcbot commented Oct 18, 2024

Team member @dtolnay has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Oct 18, 2024
@dtolnay dtolnay removed the I-libs-api-nominated Nominated for discussion during a libs-api team meeting. label Oct 18, 2024
@tgross35
Copy link
Contributor

can we const-stabilize the const_pin2 feature gate, which guards Pin::into_inner and Pin::into_inner_unchecked

Since this will likely be the same release cycle, the const_pin2 items can probably just be grouped back into const_pin.

@tgross35
Copy link
Contributor

tgross35 commented Nov 6, 2024

@Amanieu @BurntSushi @m-ou-se could this get one more check? So we avoid splitting const_pin if fcp doesn't make the next branch.

@rfcbot rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Nov 6, 2024
@rfcbot
Copy link

rfcbot commented Nov 6, 2024

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbot rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Nov 16, 2024
@rfcbot
Copy link

rfcbot commented Nov 16, 2024

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

This will be merged soon.

@RalfJung
Copy link
Member

Stabilization PR is up at #133127

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Nov 20, 2024
…ss35

Stabilize const_pin_2

Tracking issue rust-lang#76654; review before FCP in progress.
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Nov 20, 2024
Rollup merge of rust-lang#131904 - GKFX:stabilize-const-pin-2, r=tgross35

Stabilize const_pin_2

Tracking issue rust-lang#76654; review before FCP in progress.
@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Nov 21, 2024
@RalfJung RalfJung added A-const-eval Area: Constant evaluation, covers all const contexts (static, const fn, ...) and removed A-const-fn labels Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-const-eval Area: Constant evaluation, covers all const contexts (static, const fn, ...) disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants