3 ms·
I'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 w
by tedunangst 7y ago
I'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.