-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Bad error message for infinite type recursion #121090
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
Labels
A-const-eval
Area: Constant evaluation, covers all const contexts (static, const fn, ...)
A-diagnostics
Area: Messages for errors, warnings, and lints
A-trait-system
Area: Trait system
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
D-terse
Diagnostics: An error or lint that doesn't give enough information about the problem at hand.
fixed-by-next-solver
Fixed by the next-generation trait solver, `-Znext-solver`.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Feb 15, 2024
…ow, r=oli-obk Do not report overflow errors on ConstArgHasType goals This is 10% of a fix for rust-lang#121090, since it at least means that we no longer mention the `ConstArgHasType` goal as the cause for the overflow. Instead, now we mention: ``` overflow evaluating the requirement `{closure@$DIR/overflow-during-mono.rs:13:41: 13:44}: Sized` ``` which is not much better, but slightly. r? oli-obk
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Feb 15, 2024
Rollup merge of rust-lang#121105 - compiler-errors:no-const-ty-overflow, r=oli-obk Do not report overflow errors on ConstArgHasType goals This is 10% of a fix for rust-lang#121090, since it at least means that we no longer mention the `ConstArgHasType` goal as the cause for the overflow. Instead, now we mention: ``` overflow evaluating the requirement `{closure@$DIR/overflow-during-mono.rs:13:41: 13:44}: Sized` ``` which is not much better, but slightly. r? oli-obk
New error message is as following:
Suggestion to increase recursion limit is wrong. |
Under the new solver this gives the following output:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-const-eval
Area: Constant evaluation, covers all const contexts (static, const fn, ...)
A-diagnostics
Area: Messages for errors, warnings, and lints
A-trait-system
Area: Trait system
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
D-terse
Diagnostics: An error or lint that doesn't give enough information about the problem at hand.
fixed-by-next-solver
Fixed by the next-generation trait solver, `-Znext-solver`.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
relevant error:
Desired output
Rationale and extra context
Suggestion to increase recursion limit is wrong
Other cases
No response
Rust Version
Anything else?
No response
The text was updated successfully, but these errors were encountered: