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(
222222
223223 let elided_len = elided_params. len ( ) ;
224224
225- let any_lifetimes = if elided_len > 0 {
226- true
227- } else {
228- false
229- } ;
230-
231225 for ( i, info) in elided_params. into_iter ( ) . enumerate ( ) {
232226 let ElisionFailureInfo {
233227 name, lifetime_count : n, have_bound_regions
@@ -262,7 +256,7 @@ fn report_elision_failure(
262256 there is no value for it to be borrowed from") ;
263257 help ! ( db,
264258 "consider giving it a 'static lifetime" ) ;
265- } else if !any_lifetimes {
259+ } else if elided_len == 0 {
266260 help ! ( db,
267261 "this function's return type contains a borrowed value with \
268262 an elided lifetime, but the lifetime cannot be derived from \
You can’t perform that action at this time.
0 commit comments