Closed
Description
The following snippet of code is an O(n^2) loop:
https://gist.github.com/lqd/7e178cb9ac8302e24272965048627f21#file-mod-rs-L243-L256
The problem is that we are iterating over each temporary and then invoking find_assignments
, which basically walks over the MIR again. What we really want to be doing is walking the MIR at most once (ideally, coallesced into some other walk) and registered the "used mut" assignments.