summaryrefslogtreecommitdiff
path: root/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-01-06 12:08:49 +0000
committerbors <bors@rust-lang.org>2023-01-06 12:08:49 +0000
commit7bbbaabbb6ec93800409478e2af7bc063701604b (patch)
tree62c0e13b4d4bb4c3a3350e9813324ce7ad96ed56 /tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
parent1146560e1a53d26d04b33548d4eeb8e083d78509 (diff)
parent523fe7a121e80b5959bfa6203268a46e9d9e7dd4 (diff)
downloadrust-7bbbaabbb6ec93800409478e2af7bc063701604b.tar.gz
Auto merge of #105805 - yanchen4791:issue-105227-fix, r=estebank
Suggest adding named lifetime when the return contains value borrowed from more than one lifetimes of function inputs fix for #105227. The problem: The suggestion of adding an explicit `'_` lifetime bound is **incorrect** when the function's return type contains a value which could be borrowed from more than one lifetimes of the function's inputs. Instead, a named lifetime parameter can be introduced in such a case. The solution: Checking the number of elided lifetimes in the function signature. If more than one lifetimes found in the function inputs when the suggestion of adding explicit `'_` lifetime, change it to using named lifetime parameter `'a` instead.
Diffstat (limited to 'tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs')
0 files changed, 0 insertions, 0 deletions