I am a beginner,i think,lifetime of return value should be long as same as the longest lifetime in the functionin,including input value’s,for return value reference to each data,including input value.If lifetime of input value is longest in the function,the lifetime of return value is outlive all,if lifetime of input value is not longest,the lifetime of return value shuoud be the longest,at least be equal to the lifetime of which the return value refer to.
Another bug,the newes trust analyzer cannot implement completion of code with vscode,but rust plug.
Return value‘s Lifetime
最新推荐文章于 2024-10-01 17:23:58 发布