• N
    Defer reasoning about region relationships until after regionck. · 9e6d5e15
    Niko Matsakis 提交于
    This patch makes error handling for region inference failures more
    uniform by not reporting *any* region errors until the reigon inference
    step. This requires threading through more information about what
    caused a region constraint, so that we can still give informative
    error messages.
    
    I have only taken partial advantage of this information: when region
    inference fails, we still report the same error we always did, despite
    the fact that we now know precisely what caused the various constriants
    and what the region variable represents, which we did not know before.
    
    This change is required not only to improve error messages but
    because the region hierarchy is not in fact fully known until regionck,
    because it is not clear where closure bodies fit in (our current
    treatment is unsound). Moreover, the relationships between free variables
    cannot be fully determined until type inference is otherwise complete.
    
    cc #3238.
    9e6d5e15
sync-rwlock-write-mode-shouldnt-escape.rs 824 字节