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] const fn std::mem::needs_drop #51929

Closed
Havvy opened this issue Jun 30, 2018 · 13 comments · Fixed by #54596 or #60364
Closed

[tracking issue] const fn std::mem::needs_drop #51929

Havvy opened this issue Jun 30, 2018 · 13 comments · Fixed by #54596 or #60364
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. 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-lang Relevant to the language team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@Havvy
Copy link
Contributor

Havvy commented Jun 30, 2018

The issue title says it all really. std::mem::needs_drop is a function that doesn't change from call to call once monomorphized, so it should be a const function.

EDIT:

This has been implemented and it is waiting for stabilization now.

@stokhos stokhos added the A-collections Area: `std::collection` label Jun 30, 2018
@retep998 retep998 added A-const-fn Area: const fn foo(..) {..}. Pure functions which can be applied at compile time. A-destructors Area: Destructors (`Drop`, …) labels Jun 30, 2018
@oli-obk oli-obk added the E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. label Jun 30, 2018
@oli-obk
Copy link
Contributor

oli-obk commented Jun 30, 2018

blocked on #51570

@oli-obk oli-obk added the S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. label Jun 30, 2018
@JoshBrudnak
Copy link
Contributor

@oli-obk is this still blocked? If not I would like to help out with it. 👍

@oli-obk
Copy link
Contributor

oli-obk commented Aug 20, 2018

Should be fine to add behind a feature gate.

The steps are basically the same as #51171 and #51299 (but you can do them in a single PR)

JoshBrudnak added a commit to JoshBrudnak/rust that referenced this issue Aug 25, 2018
bors added a commit that referenced this issue Sep 30, 2018
Make core::mem::needs_drop a const fn

This fixes #51929.
@mjbshaw
Copy link
Contributor

mjbshaw commented Oct 1, 2018

It might be nice to keeps this issue open until const_needs_drop is stabilized.

@oli-obk oli-obk reopened this Oct 1, 2018
@oli-obk oli-obk changed the title std::mem::needs_drop should be a const fn [tracking issue] const fn std::mem::needs_drop Oct 1, 2018
@oli-obk oli-obk removed the S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. label Oct 11, 2018
@mjbshaw
Copy link
Contributor

mjbshaw commented Jan 13, 2019

I know it's only been a few months since this was implemented, but I'm curious what the road to stabilization is. I've been using this in my objrs crate and it's been working great. At what point should I send a stabilization PR?

@Mark-Simulacrum Mark-Simulacrum added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. labels Jan 13, 2019
@Mark-Simulacrum
Copy link
Member

I've nominated this for libs team to take a look at and decide whether or not to propose FCP for stabilization.

@Mark-Simulacrum Mark-Simulacrum added I-nominated and removed A-collections Area: `std::collection` A-const-fn Area: const fn foo(..) {..}. Pure functions which can be applied at compile time. A-destructors Area: Destructors (`Drop`, …) E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. labels Jan 13, 2019
@sfackler sfackler added the T-lang Relevant to the language team, which will review and decide on the PR/issue. label Jan 23, 2019
@sfackler
Copy link
Member

I've added T-lang since they'd better know if this bit of const-fn-ness is ready to stabilize.

@rfcbot fcp merge

@rfcbot
Copy link

rfcbot commented Jan 23, 2019

Team member @sfackler 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 the proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. label Jan 23, 2019
@rfcbot rfcbot added the disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. label Jan 23, 2019
@Centril
Copy link
Contributor

Centril commented Jan 24, 2019

Seems unobjectionable (assuming the implementation is up to snuff...? cc @oli-obk).

@oli-obk
Copy link
Contributor

oli-obk commented Jan 24, 2019

Yea, the impl has baked in miri since long before it was in const eval. I also rechecked it and I see no reason not to stabilize.

@Centril
Copy link
Contributor

Centril commented Mar 9, 2019

@rfcbot
Copy link

rfcbot commented Mar 29, 2019

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

@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 Mar 29, 2019
@rfcbot
Copy link

rfcbot commented Apr 8, 2019

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.

The RFC will be merged soon.

@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 Apr 8, 2019
bors added a commit that referenced this issue Apr 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. 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-lang Relevant to the language team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
10 participants