about summary refs log tree commit diff
path: root/src/libstd/sys/windows/stack_overflow.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-01-29 22:54:19 +0000
committerbors <bors@rust-lang.org>2015-01-29 22:54:19 +0000
commit52c74e63dacd49017b19330e0cbecbac0a3fe62e (patch)
tree9a89b5422499ca8fe4e285eec431ef96045f20d2 /src/libstd/sys/windows/stack_overflow.rs
parent7ea93abfb2c11111496d6e1f5b82fc21c2da27ad (diff)
parentd85520202ab05f1d67da26e00905bf22c548b86f (diff)
downloadrust-52c74e63dacd49017b19330e0cbecbac0a3fe62e.tar.gz
rust-52c74e63dacd49017b19330e0cbecbac0a3fe62e.zip
Auto merge of #21692 - pnkfelix:fsk-fix-coerce-match-20055, r=eddyb
trans: When coercing to `Box<Trait>` or `Box<[T]>`, leave datum in it's original L-/R-value state.

This fixes a subtle issue where temporaries were being allocated (but not necessarily initialized) to the (parent) terminating scope of a match expression; in particular, the code to zero out the temporary emitted by `datum.store_to` is only attached to the particular match-arm for that temporary, but when going down other arms of the match expression, the temporary may falsely appear to have been initialized, depending on what the stack held at that location, and thus may have its destructor erroneously run at the end of the terminating scope.

FIx #20055.

(There may be a latent bug still remaining in `fn into_fat_ptr`, but I am so annoyed by the test/run-pass/coerce_match.rs failures that I want to land this now.)
Diffstat (limited to 'src/libstd/sys/windows/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions