unconditional_recursion does not catch indirect infinity recursion #117541
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
none:
Desired output
Rationale and extra context
The compiler will not emit warning from
unconditional_recursion
lint if the function does mutual recursion. The above case itself is obvious, but here's a bit more complicated case:The derived implementation calls
Box::<Foo>::default()
, and callsFoo::default()
again.Other cases
N/A
Anything else?
1.73.0 can reproduce both case. 1.74.0-beta.4 and nightly-2023-11-02 have same issue.
The text was updated successfully, but these errors were encountered: