Skip to content

rustc infinite loop: warning: Constant evaluating a complex constant, this might take some time #50637

@vegard

Description

@vegard

Not sure if this is really a bug, but I tried searching and couldn't find any hits on the warning message. Feel free to close the issue if this is intended/expected behaviour.

Input:

fn main() { [(); loop {}] } 

Output:

$ rustc - error[E0019]: constant contains unimplemented expression type --> <anon>:2:10 | 2 | [(); loop {}] | ^^^^^^^ warning: Constant evaluating a complex constant, this might take some time --> <anon>:2:10 | 2 | [(); loop {}] | ^^^^^^^ 

At this point the rustc process hangs seemingly forever while consuming 100% CPU.

I'm on commit c166b03.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)A-diagnosticsArea: Messages for errors, warnings, and lintsP-mediumMedium priorityregression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions