File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -222,12 +222,6 @@ fn report_elision_failure(
222
222
223
223
let elided_len = elided_params. len ( ) ;
224
224
225
- let any_lifetimes = if elided_len > 0 {
226
- true
227
- } else {
228
- false
229
- } ;
230
-
231
225
for ( i, info) in elided_params. into_iter ( ) . enumerate ( ) {
232
226
let ElisionFailureInfo {
233
227
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
help ! ( db,
267
261
"this function's return type contains a borrowed value with \
268
262
an elided lifetime, but the lifetime cannot be derived from \
You can’t perform that action at this time.
0 commit comments