about summary refs log tree commit diff
path: root/src/test/ui/lint-unconditional-recursion.stderr
blob: fc8b9f87d8009884a56cc23fcc3f58cb9853ec10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
error: function cannot return without recurring
  --> $DIR/lint-unconditional-recursion.rs:15:1
   |
15 | / fn foo() { //~ ERROR function cannot return without recurring
16 | |     foo(); //~ NOTE recursive call site
17 | | }
   | |_^
   |
note: lint level defined here
  --> $DIR/lint-unconditional-recursion.rs:11:9
   |
11 | #![deny(unconditional_recursion)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^
note: recursive call site
  --> $DIR/lint-unconditional-recursion.rs:16:5
   |
16 |     foo(); //~ NOTE recursive call site
   |     ^^^^^
   = help: a `loop` may express intention better if this is on purpose

error: function cannot return without recurring
  --> $DIR/lint-unconditional-recursion.rs:25:1
   |
25 | / fn baz() { //~ ERROR function cannot return without recurring
26 | |     if true {
27 | |         baz() //~ NOTE recursive call site
28 | |     } else {
29 | |         baz() //~ NOTE recursive call site
30 | |     }
31 | | }
   | |_^
   |
note: recursive call site
  --> $DIR/lint-unconditional-recursion.rs:27:9
   |
27 |         baz() //~ NOTE recursive call site
   |         ^^^^^
note: recursive call site
  --> $DIR/lint-unconditional-recursion.rs:29:9
   |
29 |         baz() //~ NOTE recursive call site
   |         ^^^^^
   = help: a `loop` may express intention better if this is on purpose

error: function cannot return without recurring
  --> $DIR/lint-unconditional-recursion.rs:37:1
   |
37 | / fn quz() -> bool { //~ ERROR function cannot return without recurring
38 | |     if true {
39 | |         while quz() {} //~ NOTE recursive call site
40 | |         true
...  |
43 | |     }
44 | | }
   | |_^
   |
note: recursive call site
  --> $DIR/lint-unconditional-recursion.rs:39:15
   |
39 |         while quz() {} //~ NOTE recursive call site
   |               ^^^^^
note: recursive call site
  --> $DIR/lint-unconditional-recursion.rs:42:16
   |
42 |         loop { quz(); } //~ NOTE recursive call site
   |                ^^^^^
   = help: a `loop` may express intention better if this is on purpose

error: function cannot return without recurring
  --> $DIR/lint-unconditional-recursion.rs:48:5
   |
48 | /     fn bar(&self) { //~ ERROR function cannot return without recurring
49 | |         self.bar() //~ NOTE recursive call site
50 | |     }
   | |_____^
   |
note: recursive call site
  --> $DIR/lint-unconditional-recursion.rs:49:9
   |
49 |         self.bar() //~ NOTE recursive call site
   |         ^^^^^^^^^^
   = help: a `loop` may express intention better if this is on purpose

error: function cannot return without recurring
  --> $DIR/lint-unconditional-recursion.rs:54:5
   |
54 | /     fn bar(&self) { //~ ERROR function cannot return without recurring
55 | |         loop {
56 | |             self.bar() //~ NOTE recursive call site
57 | |         }
58 | |     }
   | |_____^
   |
note: recursive call site
  --> $DIR/lint-unconditional-recursion.rs:56:13
   |
56 |             self.bar() //~ NOTE recursive call site
   |             ^^^^^^^^^^
   = help: a `loop` may express intention better if this is on purpose

error: function cannot return without recurring
  --> $DIR/lint-unconditional-recursion.rs:63:5
   |
63 | /     fn bar(&self) { //~ ERROR function cannot return without recurring
64 | |         0.bar() //~ NOTE recursive call site
65 | |     }
   | |_____^
   |
note: recursive call site
  --> $DIR/lint-unconditional-recursion.rs:64:9
   |
64 |         0.bar() //~ NOTE recursive call site
   |         ^^^^^^^
   = help: a `loop` may express intention better if this is on purpose

error: function cannot return without recurring
  --> $DIR/lint-unconditional-recursion.rs:76:5
   |
76 | /     fn bar(&self) { //~ ERROR function cannot return without recurring
77 | |         Foo2::bar(self) //~ NOTE recursive call site
78 | |     }
   | |_____^
   |
note: recursive call site
  --> $DIR/lint-unconditional-recursion.rs:77:9
   |
77 |         Foo2::bar(self) //~ NOTE recursive call site
   |         ^^^^^^^^^^^^^^^
   = help: a `loop` may express intention better if this is on purpose

error: function cannot return without recurring
  --> $DIR/lint-unconditional-recursion.rs:82:5
   |
82 | /     fn bar(&self) { //~ ERROR function cannot return without recurring
83 | |         loop {
84 | |             Foo2::bar(self) //~ NOTE recursive call site
85 | |         }
86 | |     }
   | |_____^
   |
note: recursive call site
  --> $DIR/lint-unconditional-recursion.rs:84:13
   |
84 |             Foo2::bar(self) //~ NOTE recursive call site
   |             ^^^^^^^^^^^^^^^
   = help: a `loop` may express intention better if this is on purpose

error: function cannot return without recurring
  --> $DIR/lint-unconditional-recursion.rs:92:5
   |
92 | /     fn qux(&self) { //~ ERROR function cannot return without recurring
93 | |         self.qux(); //~ NOTE recursive call site
94 | |     }
   | |_____^
   |
note: recursive call site
  --> $DIR/lint-unconditional-recursion.rs:93:9
   |
93 |         self.qux(); //~ NOTE recursive call site
   |         ^^^^^^^^^^
   = help: a `loop` may express intention better if this is on purpose

error: function cannot return without recurring
  --> $DIR/lint-unconditional-recursion.rs:97:5
   |
97 | /     fn as_ref(&self) -> &Self { //~ ERROR function cannot return without recurring
98 | |         Baz::as_ref(self) //~ NOTE recursive call site
99 | |     }
   | |_____^
   |
note: recursive call site
  --> $DIR/lint-unconditional-recursion.rs:98:9
   |
98 |         Baz::as_ref(self) //~ NOTE recursive call site
   |         ^^^^^^^^^^^^^^^^^
   = help: a `loop` may express intention better if this is on purpose

error: function cannot return without recurring
   --> $DIR/lint-unconditional-recursion.rs:104:5
    |
104 | /     fn default() -> Baz { //~ ERROR function cannot return without recurring
105 | |         let x = Default::default(); //~ NOTE recursive call site
106 | |         x
107 | |     }
    | |_____^
    |
note: recursive call site
   --> $DIR/lint-unconditional-recursion.rs:105:17
    |
105 |         let x = Default::default(); //~ NOTE recursive call site
    |                 ^^^^^^^^^^^^^^^^^^
    = help: a `loop` may express intention better if this is on purpose

error: function cannot return without recurring
   --> $DIR/lint-unconditional-recursion.rs:113:5
    |
113 | /     fn deref(&self) -> &() { //~ ERROR function cannot return without recurring
114 | |         &**self //~ NOTE recursive call site
115 | |     }
    | |_____^
    |
note: recursive call site
   --> $DIR/lint-unconditional-recursion.rs:114:10
    |
114 |         &**self //~ NOTE recursive call site
    |          ^^^^^^
    = help: a `loop` may express intention better if this is on purpose

error: function cannot return without recurring
   --> $DIR/lint-unconditional-recursion.rs:120:5
    |
120 | /     fn index(&self, x: usize) -> &Baz { //~ ERROR function cannot return without recurring
121 | |         &self[x] //~ NOTE recursive call site
122 | |     }
    | |_____^
    |
note: recursive call site
   --> $DIR/lint-unconditional-recursion.rs:121:10
    |
121 |         &self[x] //~ NOTE recursive call site
    |          ^^^^^^^
    = help: a `loop` may express intention better if this is on purpose

error: function cannot return without recurring
   --> $DIR/lint-unconditional-recursion.rs:129:5
    |
129 | /     fn deref(&self) -> &Baz { //~ ERROR function cannot return without recurring
130 | |         self.as_ref() //~ NOTE recursive call site
131 | |     }
    | |_____^
    |
note: recursive call site
   --> $DIR/lint-unconditional-recursion.rs:130:9
    |
130 |         self.as_ref() //~ NOTE recursive call site
    |         ^^^^
    = help: a `loop` may express intention better if this is on purpose

error: aborting due to 14 previous errors