Is there a tiny error in section 6.2 Reference types?
@StefanSalew
·
2026-04-23
·
via The Rust Programming Language Forum - Latest posts
See Reference types - Learning Rust // The exact lifetime of `'a` is determined at each call site. We'll explore // what this means in more depth later. // // The lifetime of `b` works the same, we just didn't give it a name. I would write the first part as // The exact lifetime of `a` is determined at each call site. or // The exact lifetime `'a` is determined at each call site. Note, that in the first version I have removed the ' so that we refer to the variable directly, and that I have removed in the second version the "of", so that we refer to the generic lifetime directly. (a lifetime of a generic lifetime would be a bit strange?) Perhaps we should actually write // The exact lifetime `'a` of parameter `a`is determined at each call site.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。