-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Comments
The As a rough starting point, you can search for occurrences of |
…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
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
… 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
… 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
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
=== 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`. ==============
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
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
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 <[email protected]>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Done, tracking issue #86722 created for |
I am locking this issue. Please open individual issues or a zulip thread, and don't use this issue for discussion. |
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 orconst 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:if
andmatch
in constants" #49146 (1.46)loop
in constant evaluation" #52000 (1.46)const fn
integration with pattern matching #57240#![feature(const_fn_floating_point_arithmetic)]
#57241#![feature(const_err)]
)usize
casts: [tracking issue] raw ptr to usize cast inside constants #51910(#![feature(const_raw_ptr_to_usize_cast)]
)union
field access insideconst fn
#51909&mut T
references and borrows: Tracking issue for&mut T
in const contexts (const_mut_refs) #57349 (#![feature(const_mut_refs)]
)FromStr
trait usage in const fn #59133transmute
: Tracking Issue for using std::mem::transmute() in const fn (const_fn_transmute) #53605const fn(...)
/fn(...)
): Tracking issue for const fn pointers #63997const unsafe? extern fn
: Tracking issue forconst extern fn
andconst unsafe extern fn
#64926const
#66061const fn
s: Tracking Issue forasync {}
blocks in const expressions #85368mem::discriminant
: Tracking Issue for constmem::discriminant
#69821(#![feature(const_discriminant)]
)const_maybe_uninit_assume_init
Tracking Issue for const_maybe_uninit_assume_init #86722Open RFCs:
?const
trait bound opt-out: Tracking issue for RFC 2632?const
trait bound opt-out #67794(#![feature(const_trait_bound_opt_out)]
)impl const Trait for Ty
and~const
(tilde const) syntax #67792(#![feature(const_trait_impl)]
)Planned RFCs:
const fn
(this includes everything related toBox
)Completed:
unsafe
operations: Tracking issue for unsafe operations in const fn #55607The text was updated successfully, but these errors were encountered: