Closed
Description
After #56074, the error is already good enough:
error[E0720]: opaque type expands to a recursive type
--> $DIR/recursive-impl-trait-type.rs:6:22
|
LL | fn option(i: i32) -> impl Sized { //~ ERROR
| ^^^^^^^^^^ expands to self-referential type
|
= note: expanded type is `std::option::Option<(impl Sized, i32)>`
but it'd be nice if we pointed at the exact statement causing the recursion:
error[E0720]: opaque type expands to a recursive type
--> $DIR/recursive-impl-trait-type.rs:6:22
|
LL | fn option(i: i32) -> impl Sized { //~ ERROR
| ^^^^^^^^^^ expands to self-referential type
...
LL | Some((option(i - 1), i))
| ^^^^^^^^^^^^^^^^^^^^^^^^ expanded type is `std::option::Option<(impl Sized, i32)>`
LL | }
LL | }