Closed
Description
Code
#![feature(gen_blocks)]
const gen fn x() {}
Current output
error: functions cannot be both `const` and `async`
--> src/lib.rs:3:1
|
3 | const gen fn x() {}
| ^^^^^-^^^----------
| | |
| | `async` because of this
| `const` because of this
Desired output
error: functions cannot be both `const` and `gen`
--> src/lib.rs:3:1
|
3 | const gen fn x() {}
| ^^^^^-^^^----------
| | |
| | `gen` because of this
| `const` because of this
Rust Version
rustc 1.80.0 (051478957 2024-07-21)
binary: rustc
commit-hash: 051478957371ee0084a7c0913941d2a8c4757bb9
commit-date: 2024-07-21
host: x86_64-unknown-linux-gnu
release: 1.80.0
LLVM version: 18.1.7
Reproduces on the playground using 1.83.0-nightly (2024-09-05 9c01301c52df5d2d7b6f)
.
Anything else?
@rustbot label +D-incorrect +F-gen_blocks +requires-nightly