Skip to content
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

Give recursion limit errors a span #135629

Open
oli-obk opened this issue Jan 17, 2025 · 1 comment
Open

Give recursion limit errors a span #135629

oli-obk opened this issue Jan 17, 2025 · 1 comment
Assignees
Labels
A-diagnostics Area: Messages for errors, warnings, and lints E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@oli-obk
Copy link
Contributor

oli-obk commented Jan 17, 2025

For example in https://github.com/rust-lang/rust/blob/master/tests/ui/infinite/infinite-struct.rs we get an error like

error: reached the recursion limit finding the struct tail for `Take`
   |
   = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]`

We could pass in the obligation cause to struct_tail_raw and use its span for the main message and report a note for the obligation

Originally posted by @oli-obk in #135464 (comment)

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 17, 2025
@oli-obk oli-obk added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. A-diagnostics Area: Messages for errors, warnings, and lints and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jan 17, 2025
@tanvincible
Copy link

Hello @oli-obk! I'd like to take a stab at it.

@rustbot claim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

3 participants