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 #![feature(const_impl_trait)] #77463

Closed
ecstatic-morse opened this issue Oct 2, 2020 · 3 comments
Closed

Tracking Issue for #![feature(const_impl_trait)] #77463

ecstatic-morse opened this issue Oct 2, 2020 · 3 comments
Labels
A-const-fn Area: const fn foo(..) {..}. Pure functions which can be applied at compile time. B-unstable Blocker: Implemented in the nightly compiler and unstable. C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@ecstatic-morse
Copy link
Contributor

ecstatic-morse commented Oct 2, 2020

This allows argument and return position impl Trait in the signature of a const fn. It also allows impl Trait in other const-contexts, although this is only possible with additional feature gates (see #63065).

Formerly, this was gated under #![feature(const_fn)].

@ecstatic-morse ecstatic-morse added C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC A-const-fn Area: const fn foo(..) {..}. Pure functions which can be applied at compile time. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. B-unstable Blocker: Implemented in the nightly compiler and unstable. labels Oct 2, 2020
@ecstatic-morse ecstatic-morse changed the title Tracking Issue for #![feature(const_fn_impl_trait)] Tracking Issue for #![feature(const_impl_trait)] Oct 7, 2020
bors added a commit to rust-lang-ci/rust that referenced this issue Oct 7, 2020
…=oli-obk

Give `impl Trait` in a `const fn` its own feature gate

...previously it was gated under `#![feature(const_fn)]`.

I think we actually want to do this in all const-contexts? If so, this should be `#![feature(const_impl_trait)]` instead. I don't think there's any way to make use of `impl Trait` within a `const` initializer.

cc rust-lang#77463

r? `@oli-obk`
@jhpratt
Copy link
Member

jhpratt commented May 25, 2021

What are the blockers on this?

@memoryruins
Copy link
Contributor

memoryruins commented Apr 11, 2022

This was stabilized last month in #93827 and will likely be in the next release, 1.61.

@pnkfelix
Copy link
Member

This is done! Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-const-fn Area: const fn foo(..) {..}. Pure functions which can be applied at compile time. B-unstable Blocker: Implemented in the nightly compiler and unstable. C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants