lint: only consider actual calls as unconditional recursion.

Specifically, just mentioning the function name as a value is fine, as
long as it isn't called, e.g. `fn main() { let _ = main; }`.

Closes #21705.
This commit is contained in:
Huon Wilson
2015-06-29 14:51:56 -07:00
parent fe283b4067
commit b1931e48a0
2 changed files with 11 additions and 2 deletions

View File

@@ -63,4 +63,8 @@ impl Baz {
}
}
fn all_fine() {
let _f = all_fine;
}
fn main() {}