Rollup merge of #53550 - brson:recurring, r=estebank

librustc_lint: In recursion warning, change 'recurring' to 'recursing'

The existing wording seems incorrect.

Aside: This warning, 'function cannot return without recursing' is not perfectly clear - it implies that the function _can_ return, it's just got to recurse. But really the fn cannot return period. Clearer wording: 'function recurses infinitely; it cannot return'; or 'function is infinitely self-recursive; it cannot return, and this is probably an error'. I like that.
This commit is contained in:
kennytm 2018-09-07 13:47:10 +08:00
commit 1805f3c2fb
No known key found for this signature in database
GPG key ID: FEF6C8051D0E013C
6 changed files with 65 additions and 65 deletions

View file

@ -15,7 +15,7 @@ fn generic<T>() {
generic::<Option<T>>();
}
//~^^^ ERROR reached the recursion limit while instantiating `generic::<std::option::Option<
//~| WARN function cannot return without recurring
//~| WARN function cannot return without recursing

View file

@ -1,8 +1,8 @@
warning: function cannot return without recurring
warning: function cannot return without recursing
--> $DIR/issue-8727.rs:14:1
|
LL | fn generic<T>() {
| ^^^^^^^^^^^^^^^ cannot return without recurring
| ^^^^^^^^^^^^^^^ cannot return without recursing
LL | generic::<Option<T>>();
| ---------------------- recursive call site
|