-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
rustc --explain E0744 says "while" is forbidden but accepts it nontheless #79083
Copy link
Copy link
Closed
Closed
Copy link
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-bugCategory: This is a bug.Category: This is a bug.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Metadata
Metadata
Assignees
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-bugCategory: This is a bug.Category: This is a bug.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I have to use some sort of loop construct within a const function.
rustc --explain E0744does explain that loop constructs are at the moment not supported, but as I was trying outforfirst and the compiler rejected it, it would have been helpful if the explanation would hint me towardswhileworking.I think the doc just needs a small update and I think the file to update is https://github.com/rust-lang/rust/blob/master/compiler/rustc_error_codes/src/error_codes/E0744.md
I tried this code:
Meta
rustc --version --verbose: