-
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
Tracking Issue for closures in const contexts #106003
Labels
A-const-eval
Area: Constant evaluation (MIR interpretation)
A-const-fn
Area: const fn foo(..) {..}. Pure functions which can be applied at compile time.
C-tracking-issue
Category: An issue tracking the progress of sth. like the implementation of an RFC
Comments
fee1-dead
added
the
C-tracking-issue
Category: An issue tracking the progress of sth. like the implementation of an RFC
label
Dec 21, 2022
In my opinion, suggested keyword order is good. |
Merged
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Jan 13, 2023
…oli-obk Const closures cc rust-lang#106003
RalfJung
pushed a commit
to RalfJung/miri
that referenced
this issue
Jan 13, 2023
Data point: |
2 tasks
This comment was marked as resolved.
This comment was marked as resolved.
workingjubilee
added
A-const-fn
Area: const fn foo(..) {..}. Pure functions which can be applied at compile time.
A-const-eval
Area: Constant evaluation (MIR interpretation)
labels
Mar 13, 2023
thomcc
pushed a commit
to tcdi/postgrestd
that referenced
this issue
May 31, 2023
github-actions bot
pushed a commit
to rust-lang/glacier
that referenced
this issue
Jul 29, 2023
=== stdout === === stderr === error[E0658]: const closures are experimental --> /home/runner/work/glacier/glacier/ices/112822.rs:4:5 | 4 | const move || { | ^^^^^ | = note: see issue #106003 <rust-lang/rust#106003> for more information = help: add `#![feature(const_closures)]` to the crate attributes to enable error[E0015]: cannot call non-const operator in constant functions --> /home/runner/work/glacier/glacier/ices/112822.rs:9:17 | 9 | assert_eq!(first, &b'f'); | ^^^^^^^^^^^^^^^^^^^^^^^^ | = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0015]: cannot call non-const fn `core::panicking::assert_failed::<&u8, &u8>` in constant functions --> /home/runner/work/glacier/glacier/ices/112822.rs:9:17 | 9 | assert_eq!(first, &b'f'); | ^^^^^^^^^^^^^^^^^^^^^^^^ | = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 3 previous errors Some errors have detailed explanations: E0015, E0658. For more information about an error, try `rustc --explain E0015`. ==============
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-const-eval
Area: Constant evaluation (MIR interpretation)
A-const-fn
Area: const fn foo(..) {..}. Pure functions which can be applied at compile time.
C-tracking-issue
Category: An issue tracking the progress of sth. like the implementation of an RFC
This is a tracking issue for declaring const closures.
The feature gate for the issue is
#![feature(const_closures)]
.About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
Unresolved Questions
for<'a> const static async move || {}
(keyword order?)Implementation history
The text was updated successfully, but these errors were encountered: