Skip to content

Commit 3e84183

Browse files
committed
Revert "address pr review comments"
This reverts commit 05bf037.
1 parent f97769a commit 3e84183

File tree

4 files changed

+5
-51
lines changed

4 files changed

+5
-51
lines changed

compiler/rustc_middle/src/ty/layout.rs

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2595,25 +2595,7 @@ fn fn_can_unwind(
25952595
C { unwind } | Stdcall { unwind } | System { unwind } | Thiscall { unwind } => {
25962596
unwind
25972597
}
2598-
Cdecl
2599-
| Fastcall
2600-
| Vectorcall
2601-
| Aapcs
2602-
| Win64
2603-
| SysV64
2604-
| PtxKernel
2605-
| Msp430Interrupt
2606-
| X86Interrupt
2607-
| AmdGpuKernel
2608-
| EfiApi
2609-
| AvrInterrupt
2610-
| AvrNonBlockingInterrupt
2611-
| CCmseNonSecureCall
2612-
| RustIntrinsic
2613-
| PlatformIntrinsic
2614-
| Unadjusted => false,
2615-
// In the `if` above, we checked for functions with the Rust calling convention.
2616-
Rust | RustCall => unreachable!(),
2598+
_ => false,
26172599
}
26182600
}
26192601
}

compiler/rustc_mir_build/src/build/mod.rs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -590,23 +590,7 @@ fn should_abort_on_panic(tcx: TyCtxt<'_>, fn_def_id: LocalDefId, abi: Abi) -> bo
590590
// Rust and `rust-call` functions are allowed to unwind, and should not abort.
591591
Rust | RustCall => false,
592592
// Other ABI's should abort.
593-
Cdecl
594-
| Fastcall
595-
| Vectorcall
596-
| Aapcs
597-
| Win64
598-
| SysV64
599-
| PtxKernel
600-
| Msp430Interrupt
601-
| X86Interrupt
602-
| AmdGpuKernel
603-
| EfiApi
604-
| AvrInterrupt
605-
| AvrNonBlockingInterrupt
606-
| CCmseNonSecureCall
607-
| RustIntrinsic
608-
| PlatformIntrinsic
609-
| Unadjusted => true,
593+
_ => true,
610594
}
611595
}
612596
}

compiler/rustc_target/src/spec/abi.rs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ impl Abi {
107107
// N.B., this ordering MUST match the AbiDatas array above.
108108
// (This is ensured by the test indices_are_correct().)
109109
use Abi::*;
110-
let i = match self {
110+
match self {
111111
// Cross-platform ABIs
112112
Rust => 0,
113113
C { unwind: false } => 1,
@@ -138,18 +138,7 @@ impl Abi {
138138
RustCall => 24,
139139
PlatformIntrinsic => 25,
140140
Unadjusted => 26,
141-
};
142-
debug_assert!(
143-
AbiDatas
144-
.iter()
145-
.enumerate()
146-
.find(|(_, AbiData { abi, .. })| *abi == self)
147-
.map(|(index, _)| index)
148-
.expect("abi variant has associated data")
149-
== i,
150-
"Abi index did not match `AbiDatas` ordering"
151-
);
152-
i
141+
}
153142
}
154143

155144
#[inline]

src/doc/unstable-book/src/language-features/c-unwind.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ The tracking issue for this feature is: [#74990]
66

77
------------------------
88

9-
Introduces four new ABI strings: "C-unwind", "stdcall-unwind",
10-
"thiscall-unwind", and "system-unwind". These enable unwinding from other
9+
Introduces a new ABI string, "C-unwind", to enable unwinding from other
1110
languages (such as C++) into Rust frames and from Rust into other languages.
1211

1312
See [RFC 2945] for more information.

0 commit comments

Comments
 (0)