rust/compiler/rustc_infer
bors 7bbbaabbb6 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.
2023-01-06 12:08:49 +00:00
..
src Auto merge of #105805 - yanchen4791:issue-105227-fix, r=estebank 2023-01-06 12:08:49 +00:00
Cargo.toml Migrate OpaqueHiddenType, E0282, E0283, E0284, E0698 2022-08-23 14:47:07 +03:00