Closed
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.