|
|
|
|
|
by lurr
3103 days ago
|
|
No, it's more "I know the lifetimes are right, but I can't figure out how to convince the compiler. I give up, I'm just going to go write it in C++". I'm not the only one to make such comments. They made sure to try and address this in v2 of the book. It still sucks. |
|
In the rare case where the lifetime check is too expensive you're free to turn the types into pointers and use an unsafe block, which gives you the exact same constraints as you have in C++.
[1] https://doc.rust-lang.org/std/cell/index.html