-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error[E0275]: overflow evaluating the requirement &_: IntoIterator
does not show a line number
#118476
Comments
@Folcon: Please provide any reproduction instructions here if you have them, and ideally any code that can be built. Also, I don't think this issue makes it clear that you encountered this issue (what I'm guessing) in |
@compiler-errors, I found this while running cargo run, so I'm assuming the rust compiler. I encountered it developing a bevy project, I can't share the code. The project uses The full type name that appears in the text file generated is below:
In terms of a minimal repro case, after I reported the error I managed to fix it and I'm not certain how I did so unfortunately. I'm still in the process of learning rust as a I mentioned. Otherwise I'd give you a better error or have built a minimal repro case =)... Please let me know if there's anything else I can help with. |
Ok, I was just confused why this issue was tagged "docs" |
I just hit this too with 12.1. If I fix it, I'll let you know what it was! 😆 |
I also got this recently.
It doesn't have line number. It was hard to trace what was causing it. But I found it's due to the following code: The green is the fix I did. So in this case looks like the pub fn with_args(args: Vec<toml::Value>) -> Self {
let mut ctx = Self::new();
- args.iter().filter_map(|a| a.as_table()).for_each(|t| {
- ctx.kwargs.extend(t.into());
- });
- ctx.args = args;
+ ctx.args = args.clone();
+ args.into_iter()
+ .filter_map(|a| a.as_table().cloned())
+ .for_each(|t| {
+ ctx.kwargs.extend(t);
+ });
ctx
} EDIT: I want to add that pub struct FunctionCtx {
args: Vec<toml::Value>,
kwargs: toml::Table,
result: anyhow::Result<()>,
} So converting |
I tried to recreate the example in playground, and it doesn't allow me to compile unless I add the type for the |
Here is a simpler example with no external dependencies that reproduces the issue in stable: This is an annoying issue because if some library changes the argument of a function from a |
With
|
I got this error with Bevy. And also doesn't show the line number where the error occurs(Fortunately I can get where the error occurs). Here's the code below. (rustc 1.78.0 (2024-04-29)) This is the simple map loading function. It reads the txt file and spawn ascii sprite for each character.
|
I've encountered this error in this project when running
|
@nejucomo I have checked out your repository and can confirm that it indeed hits the error with stock rustc, but doesn't with |
I don't think this is too useful at this point (two years later), but since bisection was requested. output as of nightly-2023-10-06 (`error[E0282]: type annotations needed`)
output as of nightly-2023-10-07 (`error[E0275]: overflow evaluating the requirement`)
commits in range 2023-10-06 - 2023-10-07cargo-bisect-rustc gets very confused trying to generate the list of commits, (probably due to clippy tree sync?) so here's unpretty form as a backup: https://github.com/rust-lang/rust/compare/cae0791da47bb01f16885eb233dcd66b0093a6e1...9607540
None of the PRs look particularly related, except maybe #114811 ? Later un-regressed: output as of nightly-2024-04-15 (`error[E0283]: type annotations needed` again)
cargo-bisect-rustc output
Sounds like #123618 (or somewhat unlikely #107462 ?) Even though the existing mcve compiles with stock rustc presently, it might still be worth minimizing either the bevy (#118476 (comment)) or the sappho (#118476 (comment)) example down to a form that still fails on nightly, as a test case. @rustbot label: -E-needs-bisection +E-needs-mcve +A-inference -A-codegen |
Location
In the compiler rustc 1.76.0-nightly (37b2813 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:
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.
The text was updated successfully, but these errors were encountered: