Repository navigation
rust-course/basic/lifetime #1656
Replies: 3 comments 4 replies
|
紧随其后 |
0 replies
|
有意思,对于方法中的生命周期 的几个示例还是不太理解,有点难; |
0 replies
|
"有一点很容易推理出来:由于 &'a self 是被引用的一方,因此引用它的 &'b str 必须要活得比它短,否则会出现悬垂引用。因此说明生命周期 'b 必须要比 'a 小,只要满足了这一点,编译器就不会再报错:" 文中这段话不理解,为什么'b 要比'a小?? |
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
rust-course/basic/lifetime
Documentation for 认识生命周期
https://beatai.org/rust-course/basic/lifetime
All reactions