For info on how the current borrowck works, see the rustc dev guide.