Re:Rust in 2018: easier to use
by littlestymaar on Monday January 15, 2018 @03:48AM
(#16149361)
Cool. I haven't read the second version of the book, and I read the first version about two years ago I think. Glad to see this difficulty is now covered. Carry on with the great job Steve :)
Re:Rust in 2018: easier to use
by steveklabnik on Monday January 15, 2018 @08:26AM
(#16150309)
Ah ha! Yeah, it's quite different.
Thanks :)
> Lifetime annotations don’t change how long any of the references involved live. In the same way that functions can accept any type when the signature specifies a generic type parameter, functions can accept references with any lifetime when the signature specifies a generic lifetime parameter. What lifetime annotations do is relate the lifetimes of multiple references to each other.