rust/src/doc
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
..
book@0f87daf683 Update books 2021-03-01 18:00:56 -08:00
edition-guide@1da3c411f1 Update books 2021-02-16 17:19:28 -08:00
embedded-book@a96d096cff Update books 2021-03-01 18:00:56 -08:00
man Rollup merge of #59685 - lzutao:patch-1, r=GuillaumeGomez 2019-04-04 15:09:07 +02:00
nomicon@adca786547 Update books 2021-02-16 17:19:28 -08:00
reference@3b6fe80c20 Update books 2021-03-01 18:00:56 -08:00
rust-by-example@3e0d98790c Update books 2021-03-01 18:00:56 -08:00
rustc Rollup merge of #82733 - Yn0ga:master, r=estebank 2021-03-10 08:01:29 +09:00
rustc-dev-guide@c431f8c29a Update books 2021-03-01 18:00:56 -08:00
rustdoc Rollup merge of #82690 - jyn514:remove-pass-docs, r=Manishearth 2021-03-04 21:56:33 +01:00
unstable-book address pr review comments 2021-03-09 14:40:33 -05:00
complement-design-faq.md Remove the FAQs in favor of the website 2015-12-23 14:03:45 -08:00
complement-lang-faq.md Remove the FAQs in favor of the website 2015-12-23 14:03:45 -08:00
complement-project-faq.md Remove the FAQs in favor of the website 2015-12-23 14:03:45 -08:00
favicon.inc Use https URLs to refer to rust-lang.org where appropriate. 2015-08-09 14:28:46 -07:00
footer.inc rustdoc: Improve playground run buttons 2016-10-15 18:32:03 +01:00
full-toc.inc doc: add webfonts and tweak the styles accordingly 2014-04-19 21:25:35 +09:00
grammar.md Remove legacy grammar 2019-09-30 07:46:10 +02:00
guide-crates.md Grammar tweak to old guide stub documents. 2015-01-16 22:25:22 -05:00
guide-error-handling.md Convert old doc links to current edition 2019-02-13 14:39:25 +00:00
guide-ffi.md Grammar tweak to old guide stub documents. 2015-01-16 22:25:22 -05:00
guide-macros.md Grammar tweak to old guide stub documents. 2015-01-16 22:25:22 -05:00
guide-ownership.md Convert old doc links to current edition 2019-02-13 14:39:25 +00:00
guide-plugins.md Add top level sections to the Unstable Book. 2017-04-18 21:26:09 -04:00
guide-pointers.md Convert old doc links to current edition 2019-02-13 14:39:25 +00:00
guide-strings.md Grammar tweak to old guide stub documents. 2015-01-16 22:25:22 -05:00
guide-tasks.md Fix broken link in old rust guide 2015-03-04 23:18:24 +00:00
guide-testing.md Convert old doc links to current edition 2019-02-13 14:39:25 +00:00
guide-unsafe.md Grammar tweak to old guide stub documents. 2015-01-16 22:25:22 -05:00
guide.md Grammar tweak to old guide stub documents. 2015-01-16 22:25:22 -05:00
index.md Add link to rust website 2020-11-04 11:06:42 +01:00
intro.md Remove the 30 minute intro 2015-04-18 17:55:31 -04:00
not_found.md dro -> duckduckgo 2018-10-05 08:52:44 -07:00
redirect.inc Exclude old book redirect stubs from search engines 2019-03-14 22:56:38 +00:00
reference.md Redirect to the new reference 2017-02-21 14:03:13 -05:00
robots.txt Block version-specific docs from search engines 2020-03-14 02:29:35 +00:00
rust.css Improve page load performance in rustdoc. 2021-03-02 17:23:51 -08:00
rust.md Avoid linking to a moved page in rust.html 2017-03-29 15:38:47 +02:00
rustdoc.md Move rustdoc.md into the book 2015-01-21 14:59:25 -05:00
tutorial.md Update tutorial.md 2018-05-17 12:25:24 -07:00
version_info.html.template Add alt tags for logos 2016-01-20 11:53:20 -05:00