Static rustc_lint::builtin::UNCONDITIONAL_RECURSION

source ·
pub static UNCONDITIONAL_RECURSION: &'static Lint
Expand description

The unconditional_recursion lint detects functions that cannot return without calling themselves.


fn foo() {



It is usually a mistake to have a recursive call that does not have some condition to cause it to terminate. If you really intend to have an infinite loop, using a loop expression is recommended.