Re:Rust Lifetimes
by orbitur on Sunday November 01, 2015 @09:14AM
(#10486442)
Can someone explain what happened in the C example?
[ Parent
| on HN ]
Re:Rust Lifetimes
by steveklabnik on Sunday November 01, 2015 @09:17AM
(#10486452)
Well, it's not guaranteed to print 3, it can do anything it wants. Since you have a dangling pointer, it's not pointing to valid memory. So it depends.