What does the error "cycle detected when computing the inhabitedness" means?

What does this error means?

cycle detected when computing the inhabitedness of `ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst }, value: core::option::Option<domain::DomainPlayer> }`

...which again requires computing the inhabitedness of `ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst }, value: core::option::Option<domain::DomainPlayer> }`, completing the cycle

That sounds like an Internal Compiler Error (ICE - aka a bug in the compiler). Are you able to post the complete error message and the code which triggered the issue?

Unfortunately not, the code is generated and very long. It's something like this: rust - How can I use nested structs? - Stack Overflow.

If you can at least post the full error message from the compiler, then we might be able to tell you what went wrong. Otherwise, we don't have much to go by.

For normal errors, 90% of the time, the answer is in the error message itself and the compiler will often suggest ways to fix it.

If it's an ICE, it will at least give the compiler devs a backtrace they can use to troubleshoot it.

2 Likes