[][src]Static rustc_ap_rustc_session::lint::builtin::UNCONDITIONAL_RECURSION

pub static  UNCONDITIONAL_RECURSION: &Lint

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

Example

fn foo() {
    foo();
}

{{produces}}

Explanation

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.