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

Open
Havvy opened this Issue Jun 30, 2018 · 10 comments

Comments

Projects
None yet
10 participants
@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.

@oli-obk

This comment has been minimized.

Copy link
Contributor

oli-obk commented Jun 30, 2018

blocked on #51570

@oli-obk oli-obk added the S-blocked label Jun 30, 2018

@JoshBrudnak

This comment has been minimized.

Copy link
Contributor

JoshBrudnak commented Aug 18, 2018

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

@oli-obk

This comment has been minimized.

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

Auto merge of #54596 - mjbshaw:drop, r=RalfJung
Make core::mem::needs_drop a const fn

This fixes #51929.

bors added a commit that referenced this issue Sep 30, 2018

Auto merge of #54596 - mjbshaw:drop, r=RalfJung
Make core::mem::needs_drop a const fn

This fixes #51929.

@bors bors closed this in #54596 Sep 30, 2018

@mjbshaw

This comment has been minimized.

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 label Oct 11, 2018

@mjbshaw

This comment has been minimized.

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

This comment has been minimized.

Copy link
Member

Mark-Simulacrum commented Jan 13, 2019

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

@sfackler

This comment has been minimized.

Copy link
Member

sfackler commented Jan 23, 2019

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

This comment has been minimized.

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 none object), 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.

@Centril

This comment has been minimized.

Copy link
Contributor

Centril commented Jan 24, 2019

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

@Centril Centril removed the I-nominated label Jan 24, 2019

@oli-obk

This comment has been minimized.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment