-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-async-awaitArea: Async & AwaitArea: Async & AwaitA-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)A-stabilityArea: `#[stable]`, `#[unstable]` etc.Area: `#[stable]`, `#[unstable]` etc.AsyncAwait-TriagedAsync-await issues that have been triaged during a working group meeting.Async-await issues that have been triaged during a working group meeting.P-mediumMedium priorityMedium priorityrequires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.
Description
The following code compiles on stable, but not on nightly. I know this is realy bogus code, and I'm not sure it should be rejected:
fn regress() -> [(); { core::mem::ManuallyDrop::new(async { 0 }); 4 }] {
todo!()
}
On nightly, the error message is:
error: `from_generator` is not yet stable as a const fn
--> src/lib.rs:2:60
|
2 | fn regress() -> [(); { core::mem::ManuallyDrop::new(async { 0 }); 4 }] {
| ^^^^^^^^^
|
= help: add `#![feature(gen_future)]` to the crate attributes to enable
error: aborting due to previous error
error: could not compile `playground`
To learn more, run the command again with --verbose.
Metadata
Metadata
Assignees
Labels
A-async-awaitArea: Async & AwaitArea: Async & AwaitA-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)A-stabilityArea: `#[stable]`, `#[unstable]` etc.Area: `#[stable]`, `#[unstable]` etc.AsyncAwait-TriagedAsync-await issues that have been triaged during a working group meeting.Async-await issues that have been triaged during a working group meeting.P-mediumMedium priorityMedium priorityrequires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.