Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Break out of the correct number of scopes in loops #62388

Merged
merged 1 commit into from
Jul 5, 2019

Commits on Jul 4, 2019

  1. Break out of the correct number of scopes in loops

    We were incorrectly breaking out of one too many drop scopes when
    generating MIR for loops and breakable blocks, resulting in use after
    free and associated borrow checker warnings.
    
    This wasn't noticed because the scope that we're breaking out of twice
    is only used for temporaries that are created for adjustments applied to
    the loop. Since loops generally propagate coercions to the `break`
    expressions, the only case we see this is when the type of the loop is a
    smart pointer to a trait object.
    matthewjasper committed Jul 4, 2019
    Configuration menu
    Copy the full SHA
    1b7ffe5 View commit details
    Browse the repository at this point in the history