-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
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 | }
ebkalderon, BeatButton and bhgomes
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.