We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7fef162 commit a50c82bCopy full SHA for a50c82b
src/librustc_typeck/astconv.rs
@@ -222,12 +222,6 @@ fn report_elision_failure(
222
223
let elided_len = elided_params.len();
224
225
- let any_lifetimes = if elided_len > 0 {
226
- true
227
- } else {
228
- false
229
- };
230
-
231
for (i, info) in elided_params.into_iter().enumerate() {
232
let ElisionFailureInfo {
233
name, lifetime_count: n, have_bound_regions
@@ -262,7 +256,7 @@ fn report_elision_failure(
262
256
there is no value for it to be borrowed from");
263
257
help!(db,
264
258
"consider giving it a 'static lifetime");
265
- } else if !any_lifetimes {
259
+ } else if elided_len == 0 {
266
260
267
261
"this function's return type contains a borrowed value with \
268
an elided lifetime, but the lifetime cannot be derived from \
0 commit comments