• N
    replace constant regions with a post-inference check · a96b0cf8
    Niko Matsakis 提交于
    Rather than declaring some region variables to be constant, and
    reporting errors when they would have to change, we instead populate
    each free region X with a minimal set of points (the CFG plus end(X)),
    and then we let inference do its thing. This may add other `end(Y)`
    points into X; we can then check after the fact that indeed `X: Y`
    holds.
    
    This requires a bit of "blame" detection to find where the bad
    constraint came from: we are currently using a pretty dumb
    algorithm. Good place for later expansion.
    a96b0cf8
free_region.rs 9.0 KB