3 ms·
An example from less than a day ago: https://news.ycombinator.com/item?id=22466354 https://news.ycombinator.com/item?id=22466354
by steveklabnik 7y ago
An example from less than a day ago: https://news.ycombinator.com/item?id=22466354 https://news.ycombinator.com/item?id=22466354
- tedunangst 7y agoI'm not super confident I understand the bug, but it looks like sequential access to the reference. If I'm not mistaken, a mutable borrow in rust would end up with the same bug.
- steveklabnik 7y agoI have not dug into the details enough to say if this is a bug Rust would prevent or not, I am only responding to the claim that people do not sometimes suggest that Rust's complexity only matters in the multi-threaded case.
- tedunangst 7y agoGotcha.
- m-n 7y agoIf I understand correctly, each `authzPB` collected in the iteration stores references to fields of an `authzModel`. Before the patch, these were identical, referring to the fields of the loop variable v. Each iteration of the loop, v is set, and all those stored references pointed to the new value. Rust does give a compilation error for that.
- tedunangst 7y agoThat makes sense.
- fortran77 7y agoI think you're right, too.