1
- error: function cannot return without recurring
1
+ error: function cannot return without recursing
2
2
--> $DIR/lint-unconditional-recursion.rs:14:1
3
3
|
4
- LL | fn foo() { //~ ERROR function cannot return without recurring
5
- | ^^^^^^^^ cannot return without recurring
4
+ LL | fn foo() { //~ ERROR function cannot return without recursing
5
+ | ^^^^^^^^ cannot return without recursing
6
6
LL | foo();
7
7
| ----- recursive call site
8
8
|
@@ -13,11 +13,11 @@ LL | #![deny(unconditional_recursion)]
13
13
| ^^^^^^^^^^^^^^^^^^^^^^^
14
14
= help: a `loop` may express intention better if this is on purpose
15
15
16
- error: function cannot return without recurring
16
+ error: function cannot return without recursing
17
17
--> $DIR/lint-unconditional-recursion.rs:24:1
18
18
|
19
- LL | fn baz() { //~ ERROR function cannot return without recurring
20
- | ^^^^^^^^ cannot return without recurring
19
+ LL | fn baz() { //~ ERROR function cannot return without recursing
20
+ | ^^^^^^^^ cannot return without recursing
21
21
LL | if true {
22
22
LL | baz()
23
23
| ----- recursive call site
@@ -27,11 +27,11 @@ LL | baz()
27
27
|
28
28
= help: a `loop` may express intention better if this is on purpose
29
29
30
- error: function cannot return without recurring
30
+ error: function cannot return without recursing
31
31
--> $DIR/lint-unconditional-recursion.rs:36:1
32
32
|
33
- LL | fn quz() -> bool { //~ ERROR function cannot return without recurring
34
- | ^^^^^^^^^^^^^^^^ cannot return without recurring
33
+ LL | fn quz() -> bool { //~ ERROR function cannot return without recursing
34
+ | ^^^^^^^^^^^^^^^^ cannot return without recursing
35
35
LL | if true {
36
36
LL | while quz() {}
37
37
| ----- recursive call site
@@ -41,113 +41,113 @@ LL | loop { quz(); }
41
41
|
42
42
= help: a `loop` may express intention better if this is on purpose
43
43
44
- error: function cannot return without recurring
44
+ error: function cannot return without recursing
45
45
--> $DIR/lint-unconditional-recursion.rs:47:5
46
46
|
47
- LL | fn bar(&self) { //~ ERROR function cannot return without recurring
48
- | ^^^^^^^^^^^^^ cannot return without recurring
47
+ LL | fn bar(&self) { //~ ERROR function cannot return without recursing
48
+ | ^^^^^^^^^^^^^ cannot return without recursing
49
49
LL | self.bar()
50
50
| ---------- recursive call site
51
51
|
52
52
= help: a `loop` may express intention better if this is on purpose
53
53
54
- error: function cannot return without recurring
54
+ error: function cannot return without recursing
55
55
--> $DIR/lint-unconditional-recursion.rs:53:5
56
56
|
57
- LL | fn bar(&self) { //~ ERROR function cannot return without recurring
58
- | ^^^^^^^^^^^^^ cannot return without recurring
57
+ LL | fn bar(&self) { //~ ERROR function cannot return without recursing
58
+ | ^^^^^^^^^^^^^ cannot return without recursing
59
59
LL | loop {
60
60
LL | self.bar()
61
61
| ---------- recursive call site
62
62
|
63
63
= help: a `loop` may express intention better if this is on purpose
64
64
65
- error: function cannot return without recurring
65
+ error: function cannot return without recursing
66
66
--> $DIR/lint-unconditional-recursion.rs:62:5
67
67
|
68
- LL | fn bar(&self) { //~ ERROR function cannot return without recurring
69
- | ^^^^^^^^^^^^^ cannot return without recurring
68
+ LL | fn bar(&self) { //~ ERROR function cannot return without recursing
69
+ | ^^^^^^^^^^^^^ cannot return without recursing
70
70
LL | 0.bar()
71
71
| ------- recursive call site
72
72
|
73
73
= help: a `loop` may express intention better if this is on purpose
74
74
75
- error: function cannot return without recurring
75
+ error: function cannot return without recursing
76
76
--> $DIR/lint-unconditional-recursion.rs:75:5
77
77
|
78
- LL | fn bar(&self) { //~ ERROR function cannot return without recurring
79
- | ^^^^^^^^^^^^^ cannot return without recurring
78
+ LL | fn bar(&self) { //~ ERROR function cannot return without recursing
79
+ | ^^^^^^^^^^^^^ cannot return without recursing
80
80
LL | Foo2::bar(self)
81
81
| --------------- recursive call site
82
82
|
83
83
= help: a `loop` may express intention better if this is on purpose
84
84
85
- error: function cannot return without recurring
85
+ error: function cannot return without recursing
86
86
--> $DIR/lint-unconditional-recursion.rs:81:5
87
87
|
88
- LL | fn bar(&self) { //~ ERROR function cannot return without recurring
89
- | ^^^^^^^^^^^^^ cannot return without recurring
88
+ LL | fn bar(&self) { //~ ERROR function cannot return without recursing
89
+ | ^^^^^^^^^^^^^ cannot return without recursing
90
90
LL | loop {
91
91
LL | Foo2::bar(self)
92
92
| --------------- recursive call site
93
93
|
94
94
= help: a `loop` may express intention better if this is on purpose
95
95
96
- error: function cannot return without recurring
96
+ error: function cannot return without recursing
97
97
--> $DIR/lint-unconditional-recursion.rs:91:5
98
98
|
99
- LL | fn qux(&self) { //~ ERROR function cannot return without recurring
100
- | ^^^^^^^^^^^^^ cannot return without recurring
99
+ LL | fn qux(&self) { //~ ERROR function cannot return without recursing
100
+ | ^^^^^^^^^^^^^ cannot return without recursing
101
101
LL | self.qux();
102
102
| ---------- recursive call site
103
103
|
104
104
= help: a `loop` may express intention better if this is on purpose
105
105
106
- error: function cannot return without recurring
106
+ error: function cannot return without recursing
107
107
--> $DIR/lint-unconditional-recursion.rs:96:5
108
108
|
109
- LL | fn as_ref(&self) -> &Self { //~ ERROR function cannot return without recurring
110
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recurring
109
+ LL | fn as_ref(&self) -> &Self { //~ ERROR function cannot return without recursing
110
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
111
111
LL | Baz::as_ref(self)
112
112
| ----------------- recursive call site
113
113
|
114
114
= help: a `loop` may express intention better if this is on purpose
115
115
116
- error: function cannot return without recurring
116
+ error: function cannot return without recursing
117
117
--> $DIR/lint-unconditional-recursion.rs:103:5
118
118
|
119
- LL | fn default() -> Baz { //~ ERROR function cannot return without recurring
120
- | ^^^^^^^^^^^^^^^^^^^ cannot return without recurring
119
+ LL | fn default() -> Baz { //~ ERROR function cannot return without recursing
120
+ | ^^^^^^^^^^^^^^^^^^^ cannot return without recursing
121
121
LL | let x = Default::default();
122
122
| ------------------ recursive call site
123
123
|
124
124
= help: a `loop` may express intention better if this is on purpose
125
125
126
- error: function cannot return without recurring
126
+ error: function cannot return without recursing
127
127
--> $DIR/lint-unconditional-recursion.rs:112:5
128
128
|
129
- LL | fn deref(&self) -> &() { //~ ERROR function cannot return without recurring
130
- | ^^^^^^^^^^^^^^^^^^^^^^ cannot return without recurring
129
+ LL | fn deref(&self) -> &() { //~ ERROR function cannot return without recursing
130
+ | ^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
131
131
LL | &**self
132
132
| ------ recursive call site
133
133
|
134
134
= help: a `loop` may express intention better if this is on purpose
135
135
136
- error: function cannot return without recurring
136
+ error: function cannot return without recursing
137
137
--> $DIR/lint-unconditional-recursion.rs:119:5
138
138
|
139
- LL | fn index(&self, x: usize) -> &Baz { //~ ERROR function cannot return without recurring
140
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recurring
139
+ LL | fn index(&self, x: usize) -> &Baz { //~ ERROR function cannot return without recursing
140
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
141
141
LL | &self[x]
142
142
| ------- recursive call site
143
143
|
144
144
= help: a `loop` may express intention better if this is on purpose
145
145
146
- error: function cannot return without recurring
146
+ error: function cannot return without recursing
147
147
--> $DIR/lint-unconditional-recursion.rs:128:5
148
148
|
149
- LL | fn deref(&self) -> &Baz { //~ ERROR function cannot return without recurring
150
- | ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recurring
149
+ LL | fn deref(&self) -> &Baz { //~ ERROR function cannot return without recursing
150
+ | ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
151
151
LL | self.as_ref()
152
152
| ---- recursive call site
153
153
|
0 commit comments