about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorkatelyn a. martin <me+rustlang@katelyn.world>2021-04-13 09:55:21 -0400
committerFelix S. Klock II <pnkfelix@pnkfx.org>2021-04-29 17:07:56 -0400
commit8341f4274d8febf7404d3a2bffc74051331aa044 (patch)
tree2ad671fb45e37d5dd8ffaa3bef8cb767630c2777 /src
parentf97769a2b7bc5a6b3d8f7140613cf26352f2b518 (diff)
move new c abi abort behavior behind feature gate
 ### Background

    In #76570, new ABI strings including `C-unwind` were introduced.
    Their behavior is specified in RFC 2945 [1].

    However, it was reported in the #ffi-unwind stream of the Rust
    community Zulip that this had altered the way that `extern "C"`
    functions behaved even when the `c_unwind` feature gate was not
    active. [2]

 ### Overview

    This makes a small patch to
    `rustc_mir_build::build::should_abort_on_panic`, so that the same
    behavior from before is in place when the `c_unwind` gate is not
    active.

    `rustc_middle::ty::layout::fn_can_unwind` is not touched, as the
    visible behavior should not differ before/after #76570. [3]

 ### Footnotes

 [1]: https://github.com/rust-lang/rfcs/blob/master/text/2945-c-unwind-abi.md
 [2]: https://rust-lang.zulipchat.com/#narrow/stream/210922-project-ffi-unwind/topic/Is.20unwinding.20through.20extern.20C.20UB.3F/near/230112325
 [3]: https://github.com/rust-lang/rust/pull/76570/files#diff-b0320c2b8868f325d83c027fc5d71732636e9763551e35895488f30fe057c6e9L2599-R2617
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions