rust-lang / rust-lang/rust

error[E0275]: overflow evaluating the requirement `&_: IntoIterator` does not show a line number

Open
#118,476 15 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-inference C-bug E-needs-mcve T-compiler
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Location

In the compiler rustc 1.76.0-nightly (37b2813a7 2023-11-24).

Summary

Still learning the language so sorry if this isn't super detailed, I wrote a type and got this error message:

error[E0275]: overflow evaluating the requirement `&_: IntoIterator`
  |
  = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`bevy_game`)
  = note: required for `&bevy::prelude::ResMut<'_, _>` to implement `IntoIterator`
  = note: 126 redundant requirements hidden
  = note: required for `&ResMut<'_, ResMut<'_, ResMut<'_, ResMut<'_, ResMut<'_, ResMut<'_, ResMut<'_, ResMut<'_, ResMut<'_, ResMut<'_, ...>>>>>>>>>>` to implement `IntoIterator`
  = note: the full type name has been written to '<project-folder>/target/debug/deps/bevy_game-f668298e2ba0aa7c.long-type-4538768014950909176.txt'

The problem is I'm not sure where this is broken and the error message doesn't provide a line number of any kind for the problematic code.
I recalled in a talk that we should be filing documentation issues as bugs so I thought I'd drop this here, please let me know if that was in error.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported overflow diagnostic with rustc 1.76.0-nightly and inspect the generated target/debug/deps/bevy_game-f668298e2ba0aa7c.long-type-4538768014950909176.txt file. Compare the diagnostic output with the available source context; done when the missing line location is explained or the diagnostic identifies the relevant line.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.