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

Meta tracking issue for const fn #57563

Open
12 of 25 tasks
Lokathor opened this issue Jan 13, 2019 · 95 comments
Open
12 of 25 tasks

Meta tracking issue for const fn #57563

Lokathor opened this issue Jan 13, 2019 · 95 comments
Labels
A-attributes Area: #[attributes(..)] A-const-eval Area: constant evaluation (mir interpretation) A-const-fn Area: const fn foo(..) {..}. Pure functions which can be applied at compile time. A-diagnostics Area: Messages for errors, warnings, and lints A-stability Area: issues related to #[stable] and #[unstable] attributes themselves. metabug Issues about issues themselves ("bugs about bugs") T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team, which will review and decide on the PR/issue.

Comments

@Lokathor
Copy link
Contributor

Lokathor commented Jan 13, 2019

This issue tracks the progress of const fn as well as const evaluation more broadly.

This issue is not for discussion about specific extensions to const fn or const evaluation and only exists to provide links to other places that track the progress of specific issues. If you wish to discuss some subject related to const evaluation or const fn, please find an existing appropriate issue below or create an new issue and comment here with a link to the newly created issue.

If it's impossible to detect what issue the programmer should be pointed to, they can simply be pointed to this issue.


The const related issues currently on deck are as follows:


Open RFCs:

Planned RFCs:


Completed:

@varkor
Copy link
Member

varkor commented Jan 13, 2019

The rustc_const_unstable attribute should also contain an issue number, so each const feature can redirect to a specific tracking issue, rather than defaulting to #24111, which is now closed (which might be misleading to users looking for an active issue).

As a rough starting point, you can search for occurrences of "rustc_const_unstable" in the compiler to figure out how the attributes are being handled. This will require changing the diagnostics for rustc_const_unstable to point to specific tracking issues. I can provide more detailed mentoring instructions if someone wants to tackle this.

@Centril Centril added the metabug Issues about issues themselves ("bugs about bugs") label Jan 13, 2019
@varkor varkor added E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. A-const-fn Area: const fn foo(..) {..}. Pure functions which can be applied at compile time. A-diagnostics Area: Messages for errors, warnings, and lints A-attributes Area: #[attributes(..)] metabug Issues about issues themselves ("bugs about bugs") and removed metabug Issues about issues themselves ("bugs about bugs") labels Jan 13, 2019
@Centril Centril added C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. A-attributes Area: #[attributes(..)] A-stability Area: issues related to #[stable] and #[unstable] attributes themselves. and removed A-attributes Area: #[attributes(..)] labels Jan 13, 2019
Centril added a commit to Centril/rust that referenced this issue Jan 13, 2019
…ue, r=Centril

Update the const fn tracking issue to the new metabug

The new `const fn` tracking issue is rust-lang#57563. We don't want to point to a closed issue in the diagnostics (or FIXMEs), so these have been updated (from the old issue, rust-lang#24111).

r? @Centril
@Centril Centril changed the title Const Fn tracking: part 2 Meta tracking issue for const fn Jan 13, 2019
@Centril Centril added T-lang Relevant to the language team, which will review and decide on the PR/issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-const-eval Area: constant evaluation (mir interpretation) labels Jan 13, 2019
@BatmanAoD

This comment has been minimized.

@Lokathor

This comment has been minimized.

@BatmanAoD

This comment has been minimized.

@Lokathor

This comment has been minimized.

@tormol

This comment has been minimized.

@oli-obk

This comment has been minimized.

@BatmanAoD

This comment has been minimized.

Centril added a commit to Centril/rust that referenced this issue Feb 13, 2019
… r=oli-obk

Add specific feature gate error for const-unstable features

Before:
```
error: `impl Trait` in const fn is unstable
 --> src/lib.rs:7:19
  |
7 | const fn foo() -> impl T {
  |                   ^^^^^^

error: aborting due to previous error
```

After:
```
error[E0723]: `impl Trait` in const fn is unstable (see issue rust-lang#57563)
 --> src/lib.rs:7:19
  |
7 | const fn foo() -> impl T {
  |                   ^^^^^^
  = help: add #![feature(const_fn)] to the crate attributes to enable

error: aborting due to previous error
```

This improves the situation with rust-lang#57563. Fixes rust-lang#57544. Fixes rust-lang#54469.

r? @oli-obk
Centril added a commit to Centril/rust that referenced this issue Feb 13, 2019
… r=oli-obk

Add specific feature gate error for const-unstable features

Before:
```
error: `impl Trait` in const fn is unstable
 --> src/lib.rs:7:19
  |
7 | const fn foo() -> impl T {
  |                   ^^^^^^

error: aborting due to previous error
```

After:
```
error[E0723]: `impl Trait` in const fn is unstable (see issue rust-lang#57563)
 --> src/lib.rs:7:19
  |
7 | const fn foo() -> impl T {
  |                   ^^^^^^
  = help: add #![feature(const_fn)] to the crate attributes to enable

error: aborting due to previous error
```

This improves the situation with rust-lang#57563. Fixes rust-lang#57544. Fixes rust-lang#54469.

r? @oli-obk
taiki-e added a commit to taiki-e/const_fn that referenced this issue Apr 26, 2021
    error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
      --> test_suite/tests/test.rs:105:30
        |
    105 |     const fn const_generics4<T: T1<A1 = S1<1, { 2 + 1 }>>, const C: usize>() -> S1<C, { C }> {
        |                              ^
        |
        = note: see issue #57563 <rust-lang/rust#57563> for more information
        = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
github-actions bot pushed a commit to rust-lang/glacier that referenced this issue Apr 26, 2021
=== stdout ===
=== stderr ===
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/79674.rs:1:12
  |
1 | #![feature(const_generics)]
  |            ^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default
  = note: see issue #44580 <rust-lang/rust#44580> for more information

warning: the feature `const_evaluatable_checked` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/79674.rs:2:12
  |
2 | #![feature(const_evaluatable_checked)]
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #76560 <rust-lang/rust#76560> for more information

error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
  --> /home/runner/work/glacier/glacier/ices/79674.rs:18:23
   |
18 | const fn is_same_type<T: MiniTypeId, U: MiniTypeId>() -> bool {
   |                       ^
   |
   = note: see issue #57563 <rust-lang/rust#57563> for more information
   = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable

error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
  --> /home/runner/work/glacier/glacier/ices/79674.rs:18:38
   |
18 | const fn is_same_type<T: MiniTypeId, U: MiniTypeId>() -> bool {
   |                                      ^
   |
   = note: see issue #57563 <rust-lang/rust#57563> for more information
   = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable

error: aborting due to 2 previous errors; 2 warnings emitted

For more information about this error, try `rustc --explain E0658`.
==============
taiki-e added a commit to taiki-e/syn-mid that referenced this issue Apr 30, 2021
    error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
      --> examples/const_fn_test/tests/test.rs:11:6
       |
    11 | impl<T: IntoIterator> A<T> {
       |      ^
       |
       = note: see issue #57563 <rust-lang/rust#57563> for more information
       = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
taiki-e added a commit to crossbeam-rs/crossbeam that referenced this issue Apr 30, 2021
    error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
       --> crossbeam-epoch/src/atomic.rs:313:6
        |
    313 | impl<T: ?Sized + Pointable> Atomic<T> {
        |      ^
        |
        = note: see issue #57563 <rust-lang/rust#57563> for more information
        = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
bors bot added a commit to crossbeam-rs/crossbeam that referenced this issue Apr 30, 2021
692: Use feature(const_fn_trait_bound) instead of feature(const_fn) r=taiki-e a=taiki-e

    error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
       --> crossbeam-epoch/src/atomic.rs:313:6
        |
    313 | impl<T: ?Sized + Pointable> Atomic<T> {
        |      ^
        |
        = note: see issue #57563 <rust-lang/rust#57563> for more information
        = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable

Co-authored-by: Taiki Endo <te316e89@gmail.com>
@DoumanAsh

This comment has been minimized.

@RalfJung

This comment has been minimized.

@DoumanAsh

This comment has been minimized.

@RalfJung

This comment has been minimized.

@DoumanAsh

This comment has been minimized.

@RalfJung

This comment has been minimized.

@RalfJung

This comment has been minimized.

@DoumanAsh

This comment has been minimized.

@RalfJung

This comment has been minimized.

@DoumanAsh

This comment has been minimized.

@usbalbin

This comment has been minimized.

@RalfJung

This comment has been minimized.

@memoryruins

This comment has been minimized.

@usbalbin
Copy link
Contributor

Done, tracking issue #86722 created for const_maybe_uninit_assume_init

@oli-obk
Copy link
Contributor

oli-obk commented Jul 4, 2021

I am locking this issue. Please open individual issues or a zulip thread, and don't use this issue for discussion.

@rust-lang rust-lang locked and limited conversation to collaborators Jul 4, 2021
@Mark-Simulacrum Mark-Simulacrum removed the E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. label Jun 15, 2022
@joshtriplett joshtriplett removed the C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. label Aug 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-attributes Area: #[attributes(..)] A-const-eval Area: constant evaluation (mir interpretation) A-const-fn Area: const fn foo(..) {..}. Pure functions which can be applied at compile time. A-diagnostics Area: Messages for errors, warnings, and lints A-stability Area: issues related to #[stable] and #[unstable] attributes themselves. metabug Issues about issues themselves ("bugs about bugs") T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests