diff options
| author | Ariel Ben-Yehuda <ariel.byd@gmail.com> | 2016-05-29 22:01:06 +0300 |
|---|---|---|
| committer | Ariel Ben-Yehuda <ariel.byd@gmail.com> | 2016-06-04 13:26:32 +0300 |
| commit | 1ae7ae0c1c7ed68c616273f245647afa47f3cbde (patch) | |
| tree | 86db461d0a98eb58db416248a96b42ede0d86798 /src/test/run-fail | |
| parent | 506086ef9661e124280d46673b3ed93be6461ae8 (diff) | |
fix translation of terminators in MSVC cleanup blocks
MSVC requires unwinding code to be split to a tree of *funclets*, where each funclet can only branch to itself or to to its parent. Luckily, the code we generates matches this pattern. Recover that structure in an analyze pass and translate according to that.
Diffstat (limited to 'src/test/run-fail')
| -rw-r--r-- | src/test/run-fail/issue-30380.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/run-fail/issue-30380.rs b/src/test/run-fail/issue-30380.rs index 7bd9adcba9b..eb668517bdf 100644 --- a/src/test/run-fail/issue-30380.rs +++ b/src/test/run-fail/issue-30380.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(rustc_attrs)] + // check that panics in destructors during assignment do not leave // destroyed values lying around for other destructors to observe. @@ -33,6 +35,7 @@ impl<'a> Drop for Observer<'a> { } } +#[rustc_mir] fn foo(b: &mut Observer) { *b.0 = FilledOnDrop(1); } |
