Last time I tried to implement an Iterator that yielded borrowed pointers with a lifetime tied to the iterator itself, I couldn't get it to work. This function really only exists because one spot in librustc wants it, so maybe its functionality should just be inlined there.