Closed
Description
Currently, E0072 falls back to a multi-line
error[E0072]: recursive type `ListNode` has infinite size
--> src/test/compile-fail/E0072.rs:11:1
|
11 | struct ListNode { //~ ERROR E0072
| ^ recursive type has infinite size
|
= help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `ListNode` representable
Instead, can we underline a better span. It might take some experimentation to find the one that works with the ast, but perhaps something like:
error[E0072]: recursive type `ListNode` has infinite size
--> src/test/compile-fail/E0072.rs:11:1
|
11 | struct ListNode { //~ ERROR E0072
| ^^^^^^^^ recursive type has infinite size
|
= help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `ListNode` representable