-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsD-incorrectDiagnostics: A diagnostic that is giving misleading or incorrect information.Diagnostics: A diagnostic that is giving misleading or incorrect information.F-gen_blocks`gen {}` expressions that produce `Iterator`s`gen {}` expressions that produce `Iterator`sT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.
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
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsD-incorrectDiagnostics: A diagnostic that is giving misleading or incorrect information.Diagnostics: A diagnostic that is giving misleading or incorrect information.F-gen_blocks`gen {}` expressions that produce `Iterator`s`gen {}` expressions that produce `Iterator`sT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.