about summary refs log tree commit diff
path: root/src/test/ui/structs-enums/tuple-struct-construct.rs
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-07-05 13:53:13 +0200
committerGitHub <noreply@github.com>2019-07-05 13:53:13 +0200
commit18081890ea7c4f3cb38d51be5ddea4f51dc262c3 (patch)
treeedea92c0e1ce6501e5c23fd5d9c2874f15623d79 /src/test/ui/structs-enums/tuple-struct-construct.rs
parentcc696b957bfd74b1f642e0d509ca4bcba0b28953 (diff)
parent1b7ffe5300d65da7189db3f62d1cb236746e5665 (diff)
downloadrust-18081890ea7c4f3cb38d51be5ddea4f51dc262c3.tar.gz
rust-18081890ea7c4f3cb38d51be5ddea4f51dc262c3.zip
Rollup merge of #62388 - rust-lang:fix-loop-break-mir-generation, r=eddyb
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.

Closes #62312
Diffstat (limited to 'src/test/ui/structs-enums/tuple-struct-construct.rs')
0 files changed, 0 insertions, 0 deletions