about summary refs log tree commit diff
path: root/src/test/ui/thinlto
diff options
context:
space:
mode:
authorMatthew Jasper <mjjasper1@gmail.com>2019-07-04 21:53:46 +0100
committerMatthew Jasper <mjjasper1@gmail.com>2019-07-04 21:53:46 +0100
commit1b7ffe5300d65da7189db3f62d1cb236746e5665 (patch)
treef762568110e80ef9808534838876070d81a57bdc /src/test/ui/thinlto
parent848e0a23f34aaab3e4a974b031c86ef2a4e4fcc1 (diff)
downloadrust-1b7ffe5300d65da7189db3f62d1cb236746e5665.tar.gz
rust-1b7ffe5300d65da7189db3f62d1cb236746e5665.zip
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.
Diffstat (limited to 'src/test/ui/thinlto')
0 files changed, 0 insertions, 0 deletions