Rollup merge of #138028 - workingjubilee:is-rustic-abi, r=compiler-errors
compiler: add `ExternAbi::is_rustic_abi` Various parts of the compiler were hand-rolling this extremely simple check that is nonetheless easy to get wrong as the compiler evolves over time. Discourage them from being so "original" again by replacing it with a single implementation on the type that represents these ABIs. This simplifies a surprising amount of code as a result. Also fixes #132981, an ICE that emerged due to other checks being made stricter.
This commit is contained in:
commit
fe4c0850fe
7 changed files with 34 additions and 43 deletions
|
@ -53,11 +53,7 @@ fn has_ffi_unwind_calls(tcx: TyCtxt<'_>, local_def_id: LocalDefId) -> bool {
|
|||
|
||||
// Rust calls cannot themselves create foreign unwinds.
|
||||
// We assume this is true for intrinsics as well.
|
||||
if let ExternAbi::RustIntrinsic
|
||||
| ExternAbi::Rust
|
||||
| ExternAbi::RustCall
|
||||
| ExternAbi::RustCold = sig.abi()
|
||||
{
|
||||
if sig.abi().is_rustic_abi() {
|
||||
continue;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue