Borrow checker behavior with one line temp values


This seems strange to me. Shouldn’t this simply work like the commented two-line alternative? Shouldn’t row.capacity() be viewed as outside of scope of the row.resize()? After all, it is executed before resize(). Am I missing something? If not, is it something that can be improved in the language/compiler?


This is being worked on. Check out the discussion of “nested method calls” in this writeup.