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:
commit
1805f3c2fb
6 changed files with 65 additions and 65 deletions
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue