rust/compiler
bors 07ef259845 Auto merge of #84158 - cratelyn:patch-extern-c-unwind-behavior, r=nikomatsakis
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 <sup>[1]</sup>.

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. <sup>[2]</sup>

*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. <sup>[3]</sup>

---

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

[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
2021-04-14 15:35:33 +00:00
..
rustc use jemallocator in rustc/rustdoc 2021-04-04 14:10:26 -07:00
rustc_apfloat Use iter::zip in compiler/ 2021-03-26 09:32:31 -07:00
rustc_arena Remove (lots of) dead code 2021-03-27 22:16:33 -04:00
rustc_ast Implement token-based handling of attributes during expansion 2021-04-11 01:31:36 -04:00
rustc_ast_lowering Implement token-based handling of attributes during expansion 2021-04-11 01:31:36 -04:00
rustc_ast_passes rustc: Add a new wasm ABI 2021-04-08 08:03:18 -07:00
rustc_ast_pretty Use AnonConst for asm! constants 2021-04-06 12:35:41 +01:00
rustc_attr Allow specifying alignment for functions 2021-04-05 17:36:51 -04:00
rustc_builtin_macros Implement token-based handling of attributes during expansion 2021-04-11 01:31:36 -04:00
rustc_codegen_cranelift Fix outdated crate names in compiler docs 2021-04-08 11:12:14 -05:00
rustc_codegen_llvm Auto merge of #84004 - mattico:print-target-features-improvements, r=petrochenkov 2021-04-09 21:14:50 +00:00
rustc_codegen_ssa Fix closed over variables not available in debuginfo for Windows MSVC 2021-04-08 14:08:56 -04:00
rustc_data_structures Fix outdated crate names in compiler docs 2021-04-08 11:12:14 -05:00
rustc_driver Rollup merge of #83895 - eggyal:issue-83883, r=jyn514 2021-04-06 17:42:31 +02:00
rustc_error_codes Bump cfgs 2021-04-04 14:57:05 -04:00
rustc_errors Document compiler/ with -Aprivate-intra-doc-links 2021-04-05 08:38:09 -04:00
rustc_expand Implement token-based handling of attributes during expansion 2021-04-11 01:31:36 -04:00
rustc_feature Auto merge of #84008 - Dylan-DPC:rollup-invxvg8, r=Dylan-DPC 2021-04-08 19:38:54 +00:00
rustc_fs_util Optimize away a fs::metadata call. 2021-01-06 08:33:15 -08:00
rustc_graphviz Remove (lots of) dead code 2021-03-27 22:16:33 -04:00
rustc_hir Rollup merge of #83980 - pierwill:fix-compiler-librustc-names, r=davidtwco 2021-04-08 20:29:58 +02:00
rustc_hir_pretty Use AnonConst for asm! constants 2021-04-06 12:35:41 +01:00
rustc_incremental Also profile finishing the encoding. 2021-03-30 18:10:08 +02:00
rustc_index Add fixme comment to revert change once const_panic is stable 2021-04-03 13:07:03 +02:00
rustc_infer Fix outdated crate names in compiler docs 2021-04-08 11:12:14 -05:00
rustc_interface Fix outdated crate names in rustc_interface::callbacks 2021-04-07 11:45:27 -05:00
rustc_lexer Fix outdated crate names in compiler docs 2021-04-08 11:12:14 -05:00
rustc_lint Turn old edition lints (anonymous-parameters, keyword-idents) into warn-by-default on 2015 2021-04-12 09:45:59 -07:00
rustc_lint_defs Add bad_asm_style to HardwiredLints 2021-04-10 19:24:24 +01:00
rustc_llvm Categorize and explain target features support 2021-04-09 10:16:04 -05:00
rustc_macros Use iter::zip in compiler/ 2021-03-26 09:32:31 -07:00
rustc_metadata Rollup merge of #83820 - petrochenkov:nolinkargs, r=nagisa 2021-04-05 00:24:33 +02:00
rustc_middle Rollup merge of #84014 - estebank:cool-bears-hot-tip, r=varkor 2021-04-12 01:04:04 +02:00
rustc_mir Auto merge of #83870 - jackh726:binder-refactor-fix, r=nikomatsakis 2021-04-09 01:50:01 +00:00
rustc_mir_build move new c abi abort behavior behind feature gate 2021-04-13 09:55:21 -04:00
rustc_parse don't bump in check_mistyped_turbofish_with_multiple_type_params 2021-04-12 21:09:04 +02:00
rustc_parse_format Rollup merge of #83348 - osa1:issue83344, r=jackh726 2021-03-28 01:33:13 +09:00
rustc_passes Rollup merge of #83916 - Amanieu:asm_anonconst, r=petrochenkov 2021-04-07 13:07:14 +02:00
rustc_plugin_impl Remove hir::Item::attrs. 2021-03-09 19:27:50 +01:00
rustc_privacy Update with comments 2021-03-23 17:16:20 +00:00
rustc_query_impl Auto merge of #83207 - oli-obk:valtree2, r=lcnr 2021-04-02 10:28:12 +00:00
rustc_query_system Fix outdated crate names in compiler docs 2021-04-08 11:12:14 -05:00
rustc_resolve Rollup merge of #83669 - kwj2104:issue-81508-fix, r=varkor 2021-04-12 01:04:03 +02:00
rustc_save_analysis Remove hir::CrateItem. 2021-03-30 20:31:06 +02:00
rustc_serialize Auto merge of #83465 - michaelwoerister:safe-read_raw_bytes, r=cjgillot 2021-03-26 01:28:59 +00:00
rustc_session Allow using -C force-unwind-tables=no when panic=unwind 2021-04-11 22:32:40 +08:00
rustc_span rustc: Add a new wasm ABI 2021-04-08 08:03:18 -07:00
rustc_symbol_mangling Rollup merge of #80525 - devsnek:wasm64, r=nagisa 2021-04-05 00:24:23 +02:00
rustc_target Avoid an Option<Option<_>> 2021-04-13 18:42:19 +02:00
rustc_trait_selection Rollup merge of #83980 - pierwill:fix-compiler-librustc-names, r=davidtwco 2021-04-08 20:29:58 +02:00
rustc_traits Auto merge of #83207 - oli-obk:valtree2, r=lcnr 2021-04-02 10:28:12 +00:00
rustc_ty_utils Track bound vars 2021-03-31 10:15:27 -04:00
rustc_type_ir Remove nightly features in rustc_type_ir 2021-04-03 10:00:09 +02:00
rustc_typeck Rollup merge of #84141 - camelid:fix-typo, r=Dylan-DPC 2021-04-13 11:10:44 +02:00