1
Fork 0
rust/src
bors 17a07d71bf Auto merge of #76570 - cratelyn:implement-rfc-2945-c-unwind-abi, r=Amanieu
Implement RFC 2945: "C-unwind" ABI

## Implement RFC 2945: "C-unwind" ABI

This branch implements [RFC 2945]. The tracking issue for this RFC is #74990.

The feature gate for the issue is `#![feature(c_unwind)]`.

This RFC was created as part of the ffi-unwind project group tracked at rust-lang/lang-team#19.

### Changes

Further details will be provided in commit messages, but a high-level overview
of the changes follows:

* A boolean `unwind` payload is added to the `C`, `System`, `Stdcall`,
and `Thiscall` variants, marking whether unwinding across FFI boundaries is
acceptable. The cases where each of these variants' `unwind` member is true
correspond with the `C-unwind`, `system-unwind`, `stdcall-unwind`, and
`thiscall-unwind` ABI strings introduced in RFC 2945 [3].

* This commit adds a `c_unwind` feature gate for the new ABI strings.
Tests for this feature gate are included in `src/test/ui/c-unwind/`, which
ensure that this feature gate works correctly for each of the new ABIs.
A new language features entry in the unstable book is added as well.

* We adjust the `rustc_middle::ty::layout::fn_can_unwind` function,
used to compute whether or not a `FnAbi` object represents a function that
should be able to unwind when `panic=unwind` is in use.

* Changes are also made to
`rustc_mir_build::build::should_abort_on_panic` so that the function ABI is
used to determind whether it should abort, assuming that the `panic=unwind`
strategy is being used, and no explicit unwind attribute was provided.

[RFC 2945]: https://github.com/rust-lang/rfcs/blob/master/text/2945-c-unwind-abi.md
2021-03-10 16:44:04 +00:00
..
bootstrap Rollup merge of #82802 - jyn514:build-rustdoc-fullmake, r=Mark-Simulacrum 2021-03-10 08:01:30 +09:00
build_helper
ci Auto merge of #82747 - JohnTitor:pin-es-check-version, r=Mark-Simulacrum 2021-03-04 19:24:21 +00:00
doc Auto merge of #76570 - cratelyn:implement-rfc-2945-c-unwind-abi, r=Amanieu 2021-03-10 16:44:04 +00:00
etc Rollup merge of #82557 - rylev:natvis-improvements, r=varkor 2021-03-08 13:13:20 +01:00
librustdoc Auto merge of #79519 - cjgillot:noattr, r=wesleywiser 2021-03-10 08:40:51 +00:00
llvm-project@bbf96c9f18 Backport some LLVM compile-time improvements 2021-03-05 17:59:28 +01:00
rustdoc-json-types x.py fmt 2021-03-06 15:50:29 -05:00
test Auto merge of #76570 - cratelyn:implement-rfc-2945-c-unwind-abi, r=Amanieu 2021-03-10 16:44:04 +00:00
tools Auto merge of #79519 - cjgillot:noattr, r=wesleywiser 2021-03-10 08:40:51 +00:00
README.md update message 2021-02-14 10:08:37 +05:30
stage0.txt Update the bootstrap compiler 2021-02-20 17:19:30 -05:00
version bump nightly version to 1.52.0 2021-02-05 16:25:08 +01:00

This directory contains the source code of the rust project, including:

  • The test suite
  • The bootstrapping build system
  • Various submodules for tools, like rustdoc, rls, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.