Skip to content

Give recursion limit errors a span #135629

@oli-obk

Description

@oli-obk

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)

Metadata

Metadata

Assignees

Labels

A-diagnosticsArea: Messages for errors, warnings, and lintsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions