diff --git a/compiler/rustc_ast_lowering/src/item.rs b/compiler/rustc_ast_lowering/src/item.rs index edd0c5fb9647e..7b043705c1e0e 100644 --- a/compiler/rustc_ast_lowering/src/item.rs +++ b/compiler/rustc_ast_lowering/src/item.rs @@ -319,10 +319,10 @@ impl<'hir> LoweringContext<'_, 'hir> { }, ItemKind::ForeignMod(ref fm) => { if fm.abi.is_none() { - self.maybe_lint_missing_abi(span, id, abi::Abi::C { unwind: false }); + self.maybe_lint_missing_abi(span, id, abi::Abi::C); } hir::ItemKind::ForeignMod { - abi: fm.abi.map_or(abi::Abi::C { unwind: false }, |abi| self.lower_abi(abi)), + abi: fm.abi.map_or(abi::Abi::C, |abi| self.lower_abi(abi)), items: self .arena .alloc_from_iter(fm.items.iter().map(|x| self.lower_foreign_item_ref(x))), @@ -1334,8 +1334,8 @@ impl<'hir> LoweringContext<'_, 'hir> { match ext { Extern::None => abi::Abi::Rust, Extern::Implicit => { - self.maybe_lint_missing_abi(span, id, abi::Abi::C { unwind: false }); - abi::Abi::C { unwind: false } + self.maybe_lint_missing_abi(span, id, abi::Abi::C); + abi::Abi::C } Extern::Explicit(abi) => self.lower_abi(abi), } diff --git a/compiler/rustc_ast_passes/src/feature_gate.rs b/compiler/rustc_ast_passes/src/feature_gate.rs index 0ca9c12f4c133..1b79eafe36109 100644 --- a/compiler/rustc_ast_passes/src/feature_gate.rs +++ b/compiler/rustc_ast_passes/src/feature_gate.rs @@ -164,38 +164,6 @@ impl<'a> PostExpansionVisitor<'a> { "C-cmse-nonsecure-call ABI is experimental and subject to change" ); } - "C-unwind" => { - gate_feature_post!( - &self, - c_unwind, - span, - "C-unwind ABI is experimental and subject to change" - ); - } - "stdcall-unwind" => { - gate_feature_post!( - &self, - c_unwind, - span, - "stdcall-unwind ABI is experimental and subject to change" - ); - } - "system-unwind" => { - gate_feature_post!( - &self, - c_unwind, - span, - "system-unwind ABI is experimental and subject to change" - ); - } - "thiscall-unwind" => { - gate_feature_post!( - &self, - c_unwind, - span, - "thiscall-unwind ABI is experimental and subject to change" - ); - } abi => self .sess .parse_sess diff --git a/compiler/rustc_codegen_cranelift/src/abi/mod.rs b/compiler/rustc_codegen_cranelift/src/abi/mod.rs index b158d73f3a1a8..c79889f8ca1da 100644 --- a/compiler/rustc_codegen_cranelift/src/abi/mod.rs +++ b/compiler/rustc_codegen_cranelift/src/abi/mod.rs @@ -476,11 +476,8 @@ pub(crate) fn codegen_terminator_call<'tcx>( // FIXME find a cleaner way to support varargs if fn_sig.c_variadic { - if !matches!(fn_sig.abi, Abi::C { .. }) { - fx.tcx.sess.span_fatal( - span, - &format!("Variadic call for non-C abi {:?}", fn_sig.abi), - ); + if fn_sig.abi != Abi::C { + fx.tcx.sess.span_fatal(span, &format!("Variadic call for non-C abi {:?}", fn_sig.abi)); } let sig_ref = fx.bcx.func.dfg.call_signature(call_inst).unwrap(); let abi_params = call_args diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs index 79ec9c264998c..a02117319cc13 100644 --- a/compiler/rustc_feature/src/active.rs +++ b/compiler/rustc_feature/src/active.rs @@ -644,9 +644,6 @@ declare_features! ( /// Allows associated types in inherent impls. (active, inherent_associated_types, "1.52.0", Some(8995), None), - /// Allows `extern "C-unwind" fn` to enable unwinding across ABI boundaries. - (active, c_unwind, "1.52.0", Some(74990), None), - // ------------------------------------------------------------------------- // feature-group-end: actual feature gates // ------------------------------------------------------------------------- diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs index 2f5380861c495..6d2ab0e5f5a80 100644 --- a/compiler/rustc_middle/src/ty/layout.rs +++ b/compiler/rustc_middle/src/ty/layout.rs @@ -2654,14 +2654,14 @@ where RustIntrinsic | PlatformIntrinsic | Rust | RustCall => Conv::Rust, // It's the ABI's job to select this, not ours. - System { .. } => bug!("system abi should be selected elsewhere"), + System => bug!("system abi should be selected elsewhere"), EfiApi => bug!("eficall abi should be selected elsewhere"), - Stdcall { .. } => Conv::X86Stdcall, + Stdcall => Conv::X86Stdcall, Fastcall => Conv::X86Fastcall, Vectorcall => Conv::X86VectorCall, - Thiscall { .. } => Conv::X86ThisCall, - C { .. } => Conv::C, + Thiscall => Conv::X86ThisCall, + C => Conv::C, Unadjusted => Conv::C, Win64 => Conv::X86_64Win64, SysV64 => Conv::X86_64SysV, diff --git a/compiler/rustc_mir/src/interpret/terminator.rs b/compiler/rustc_mir/src/interpret/terminator.rs index 4aa1360d53539..0807949a2d91b 100644 --- a/compiler/rustc_mir/src/interpret/terminator.rs +++ b/compiler/rustc_mir/src/interpret/terminator.rs @@ -248,9 +248,9 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { }; if normalize_abi(caller_abi) != normalize_abi(callee_abi) { throw_ub_format!( - "calling a function with ABI {} using caller ABI {}", - callee_abi.name(), - caller_abi.name() + "calling a function with ABI {:?} using caller ABI {:?}", + callee_abi, + caller_abi ) } } diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index cd3dabb67950b..5aa6275a96166 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -330,7 +330,6 @@ symbols! { bridge, bswap, c_str, - c_unwind, c_variadic, call, call_mut, diff --git a/compiler/rustc_symbol_mangling/src/v0.rs b/compiler/rustc_symbol_mangling/src/v0.rs index 12c0a147990fa..bbf7ecc39cfd9 100644 --- a/compiler/rustc_symbol_mangling/src/v0.rs +++ b/compiler/rustc_symbol_mangling/src/v0.rs @@ -440,7 +440,7 @@ impl Printer<'tcx> for SymbolMangler<'tcx> { } match sig.abi { Abi::Rust => {} - Abi::C { unwind: false } => cx.push("KC"), + Abi::C => cx.push("KC"), abi => { cx.push("K"); let name = abi.name(); diff --git a/compiler/rustc_target/src/spec/abi.rs b/compiler/rustc_target/src/spec/abi.rs index f7f9c30d3b7a6..65e8a4e8db2ad 100644 --- a/compiler/rustc_target/src/spec/abi.rs +++ b/compiler/rustc_target/src/spec/abi.rs @@ -8,21 +8,24 @@ mod tests; #[derive(PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy, Debug)] #[derive(HashStable_Generic, Encodable, Decodable)] pub enum Abi { + // N.B., this ordering MUST match the AbiDatas array below. + // (This is ensured by the test indices_are_correct().) + // Multiplatform / generic ABIs // // These ABIs come first because every time we add a new ABI, we // have to re-bless all the hashing tests. These are used in many // places, so giving them stable values reduces test churn. The // specific values are meaningless. - Rust, - C { unwind: bool }, + Rust = 0, + C = 1, // Single platform ABIs Cdecl, - Stdcall { unwind: bool }, + Stdcall, Fastcall, Vectorcall, - Thiscall { unwind: bool }, + Thiscall, Aapcs, Win64, SysV64, @@ -36,7 +39,7 @@ pub enum Abi { CCmseNonSecureCall, // Multiplatform / generic ABIs - System { unwind: bool }, + System, RustIntrinsic, RustCall, PlatformIntrinsic, @@ -58,16 +61,13 @@ pub struct AbiData { const AbiDatas: &[AbiData] = &[ // Cross-platform ABIs AbiData { abi: Abi::Rust, name: "Rust", generic: true }, - AbiData { abi: Abi::C { unwind: false }, name: "C", generic: true }, - AbiData { abi: Abi::C { unwind: true }, name: "C-unwind", generic: true }, + AbiData { abi: Abi::C, name: "C", generic: true }, // Platform-specific ABIs AbiData { abi: Abi::Cdecl, name: "cdecl", generic: false }, - AbiData { abi: Abi::Stdcall { unwind: false }, name: "stdcall", generic: false }, - AbiData { abi: Abi::Stdcall { unwind: true }, name: "stdcall-unwind", generic: false }, + AbiData { abi: Abi::Stdcall, name: "stdcall", generic: false }, AbiData { abi: Abi::Fastcall, name: "fastcall", generic: false }, AbiData { abi: Abi::Vectorcall, name: "vectorcall", generic: false }, - AbiData { abi: Abi::Thiscall { unwind: false }, name: "thiscall", generic: false }, - AbiData { abi: Abi::Thiscall { unwind: true }, name: "thiscall-unwind", generic: false }, + AbiData { abi: Abi::Thiscall, name: "thiscall", generic: false }, AbiData { abi: Abi::Aapcs, name: "aapcs", generic: false }, AbiData { abi: Abi::Win64, name: "win64", generic: false }, AbiData { abi: Abi::SysV64, name: "sysv64", generic: false }, @@ -84,8 +84,7 @@ const AbiDatas: &[AbiData] = &[ }, AbiData { abi: Abi::CCmseNonSecureCall, name: "C-cmse-nonsecure-call", generic: false }, // Cross-platform ABIs - AbiData { abi: Abi::System { unwind: false }, name: "system", generic: true }, - AbiData { abi: Abi::System { unwind: true }, name: "system-unwind", generic: true }, + AbiData { abi: Abi::System, name: "system", generic: true }, AbiData { abi: Abi::RustIntrinsic, name: "rust-intrinsic", generic: true }, AbiData { abi: Abi::RustCall, name: "rust-call", generic: true }, AbiData { abi: Abi::PlatformIntrinsic, name: "platform-intrinsic", generic: true }, @@ -104,41 +103,7 @@ pub fn all_names() -> Vec<&'static str> { impl Abi { #[inline] pub fn index(self) -> usize { - // N.B., this ordering MUST match the AbiDatas array above. - // (This is ensured by the test indices_are_correct().) - use Abi::*; - match self { - // Cross-platform ABIs - Rust => 0, - C { unwind: false } => 1, - C { unwind: true } => 2, - // Platform-specific ABIs - Cdecl => 3, - Stdcall { unwind: false } => 4, - Stdcall { unwind: true } => 5, - Fastcall => 6, - Vectorcall => 7, - Thiscall { unwind: false } => 8, - Thiscall { unwind: true } => 9, - Aapcs => 10, - Win64 => 11, - SysV64 => 12, - PtxKernel => 13, - Msp430Interrupt => 14, - X86Interrupt => 15, - AmdGpuKernel => 16, - EfiApi => 17, - AvrInterrupt => 18, - AvrNonBlockingInterrupt => 19, - CCmseNonSecureCall => 20, - // Cross-platform ABIs - System { unwind: false } => 21, - System { unwind: true } => 22, - RustIntrinsic => 23, - RustCall => 24, - PlatformIntrinsic => 25, - Unadjusted => 26, - } + self as usize } #[inline] @@ -157,8 +122,6 @@ impl Abi { impl fmt::Display for Abi { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match self { - abi => write!(f, "\"{}\"", abi.name()), - } + write!(f, "\"{}\"", self.name()) } } diff --git a/compiler/rustc_target/src/spec/arm_base.rs b/compiler/rustc_target/src/spec/arm_base.rs index 01f573313c97f..b74d80dc6bb2b 100644 --- a/compiler/rustc_target/src/spec/arm_base.rs +++ b/compiler/rustc_target/src/spec/arm_base.rs @@ -2,14 +2,5 @@ use crate::spec::abi::Abi; // All the calling conventions trigger an assertion(Unsupported calling convention) in llvm on arm pub fn unsupported_abis() -> Vec { - vec![ - Abi::Stdcall { unwind: false }, - Abi::Stdcall { unwind: true }, - Abi::Fastcall, - Abi::Vectorcall, - Abi::Thiscall { unwind: false }, - Abi::Thiscall { unwind: true }, - Abi::Win64, - Abi::SysV64, - ] + vec![Abi::Stdcall, Abi::Fastcall, Abi::Vectorcall, Abi::Thiscall, Abi::Win64, Abi::SysV64] } diff --git a/compiler/rustc_target/src/spec/mipsel_unknown_none.rs b/compiler/rustc_target/src/spec/mipsel_unknown_none.rs index 110c8dd80ea77..0f9d3c3de1543 100644 --- a/compiler/rustc_target/src/spec/mipsel_unknown_none.rs +++ b/compiler/rustc_target/src/spec/mipsel_unknown_none.rs @@ -23,12 +23,10 @@ pub fn target() -> Target { panic_strategy: PanicStrategy::Abort, relocation_model: RelocModel::Static, unsupported_abis: vec![ - Abi::Stdcall { unwind: false }, - Abi::Stdcall { unwind: true }, + Abi::Stdcall, Abi::Fastcall, Abi::Vectorcall, - Abi::Thiscall { unwind: false }, - Abi::Thiscall { unwind: true }, + Abi::Thiscall, Abi::Win64, Abi::SysV64, ], diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index c9fffd213d768..09400a1d13066 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -1284,31 +1284,24 @@ impl Target { /// Given a function ABI, turn it into the correct ABI for this target. pub fn adjust_abi(&self, abi: Abi) -> Abi { match abi { - Abi::System { unwind } => { + Abi::System => { if self.is_like_windows && self.arch == "x86" { - Abi::Stdcall { unwind } + Abi::Stdcall } else { - Abi::C { unwind } + Abi::C } } // These ABI kinds are ignored on non-x86 Windows targets. // See https://docs.microsoft.com/en-us/cpp/cpp/argument-passing-and-naming-conventions // and the individual pages for __stdcall et al. - Abi::Stdcall { unwind } | Abi::Thiscall { unwind } => { - if self.is_like_windows && self.arch != "x86" { Abi::C { unwind } } else { abi } - } - Abi::Fastcall | Abi::Vectorcall => { - if self.is_like_windows && self.arch != "x86" { - Abi::C { unwind: false } - } else { - abi - } + Abi::Stdcall | Abi::Fastcall | Abi::Vectorcall | Abi::Thiscall => { + if self.is_like_windows && self.arch != "x86" { Abi::C } else { abi } } Abi::EfiApi => { if self.arch == "x86_64" { Abi::Win64 } else { - Abi::C { unwind: false } + Abi::C } } abi => abi, diff --git a/compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs b/compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs index 15d8e4843f976..3c9c7d578fbd4 100644 --- a/compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs +++ b/compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs @@ -49,12 +49,10 @@ pub fn target() -> Target { // create the tests for this. unsupported_abis: vec![ Abi::Cdecl, - Abi::Stdcall { unwind: false }, - Abi::Stdcall { unwind: true }, + Abi::Stdcall, Abi::Fastcall, Abi::Vectorcall, - Abi::Thiscall { unwind: false }, - Abi::Thiscall { unwind: true }, + Abi::Thiscall, Abi::Aapcs, Abi::Win64, Abi::SysV64, diff --git a/compiler/rustc_target/src/spec/riscv_base.rs b/compiler/rustc_target/src/spec/riscv_base.rs index 5bcbb2e621bd0..64cf890037e51 100644 --- a/compiler/rustc_target/src/spec/riscv_base.rs +++ b/compiler/rustc_target/src/spec/riscv_base.rs @@ -5,12 +5,10 @@ use crate::spec::abi::Abi; pub fn unsupported_abis() -> Vec { vec![ Abi::Cdecl, - Abi::Stdcall { unwind: false }, - Abi::Stdcall { unwind: true }, + Abi::Stdcall, Abi::Fastcall, Abi::Vectorcall, - Abi::Thiscall { unwind: false }, - Abi::Thiscall { unwind: true }, + Abi::Thiscall, Abi::Aapcs, Abi::Win64, Abi::SysV64, diff --git a/compiler/rustc_typeck/src/collect.rs b/compiler/rustc_typeck/src/collect.rs index e5136355ca982..b445143415795 100644 --- a/compiler/rustc_typeck/src/collect.rs +++ b/compiler/rustc_typeck/src/collect.rs @@ -2678,7 +2678,7 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, id: DefId) -> CodegenFnAttrs { } else if tcx.sess.check_name(attr, sym::used) { codegen_fn_attrs.flags |= CodegenFnAttrFlags::USED; } else if tcx.sess.check_name(attr, sym::cmse_nonsecure_entry) { - if !matches!(tcx.fn_sig(id).abi(), abi::Abi::C { .. }) { + if tcx.fn_sig(id).abi() != abi::Abi::C { struct_span_err!( tcx.sess, attr.span, diff --git a/compiler/rustc_typeck/src/lib.rs b/compiler/rustc_typeck/src/lib.rs index 88b47bf5b9cdd..c8597408b51b3 100644 --- a/compiler/rustc_typeck/src/lib.rs +++ b/compiler/rustc_typeck/src/lib.rs @@ -118,19 +118,14 @@ use astconv::AstConv; use bounds::Bounds; fn require_c_abi_if_c_variadic(tcx: TyCtxt<'_>, decl: &hir::FnDecl<'_>, abi: Abi, span: Span) { - match (decl.c_variadic, abi) { - // The function has the correct calling convention, or isn't a "C-variadic" function. - (false, _) | (true, Abi::C { .. }) | (true, Abi::Cdecl) => {} - // The function is a "C-variadic" function with an incorrect calling convention. - (true, _) => { - let mut err = struct_span_err!( - tcx.sess, - span, - E0045, - "C-variadic function must have C or cdecl calling convention" - ); - err.span_label(span, "C-variadics require C or cdecl calling convention").emit(); - } + if decl.c_variadic && !(abi == Abi::C || abi == Abi::Cdecl) { + let mut err = struct_span_err!( + tcx.sess, + span, + E0045, + "C-variadic function must have C or cdecl calling convention" + ); + err.span_label(span, "C-variadics require C or cdecl calling convention").emit(); } } diff --git a/src/doc/unstable-book/src/language-features/c-unwind.md b/src/doc/unstable-book/src/language-features/c-unwind.md deleted file mode 100644 index c1705d59acc21..0000000000000 --- a/src/doc/unstable-book/src/language-features/c-unwind.md +++ /dev/null @@ -1,14 +0,0 @@ -# `c_unwind` - -The tracking issue for this feature is: [#74990] - -[#74990]: https://github.com/rust-lang/rust/issues/74990 - ------------------------- - -Introduces a new ABI string, "C-unwind", to enable unwinding from other -languages (such as C++) into Rust frames and from Rust into other languages. - -See [RFC 2945] for more information. - -[RFC 2945]: https://github.com/rust-lang/rfcs/blob/master/text/2945-c-unwind-abi.md diff --git a/src/test/ui/codemap_tests/unicode.stderr b/src/test/ui/codemap_tests/unicode.stderr index b7ba4fa46d92b..61c3f4f1c9847 100644 --- a/src/test/ui/codemap_tests/unicode.stderr +++ b/src/test/ui/codemap_tests/unicode.stderr @@ -4,7 +4,7 @@ error[E0703]: invalid ABI: found `路濫狼á́́` LL | extern "路濫狼á́́" fn foo() {} | ^^^^^^^^^ invalid ABI | - = help: valid ABIs: Rust, C, C-unwind, cdecl, stdcall, stdcall-unwind, fastcall, vectorcall, thiscall, thiscall-unwind, aapcs, win64, sysv64, ptx-kernel, msp430-interrupt, x86-interrupt, amdgpu-kernel, efiapi, avr-interrupt, avr-non-blocking-interrupt, C-cmse-nonsecure-call, system, system-unwind, rust-intrinsic, rust-call, platform-intrinsic, unadjusted + = help: valid ABIs: Rust, C, cdecl, stdcall, fastcall, vectorcall, thiscall, aapcs, win64, sysv64, ptx-kernel, msp430-interrupt, x86-interrupt, amdgpu-kernel, efiapi, avr-interrupt, avr-non-blocking-interrupt, C-cmse-nonsecure-call, system, rust-intrinsic, rust-call, platform-intrinsic, unadjusted error: aborting due to previous error diff --git a/src/test/ui/parser/issue-8537.stderr b/src/test/ui/parser/issue-8537.stderr index 85e2b77d867b9..3f63c08021098 100644 --- a/src/test/ui/parser/issue-8537.stderr +++ b/src/test/ui/parser/issue-8537.stderr @@ -4,7 +4,7 @@ error[E0703]: invalid ABI: found `invalid-ab_isize` LL | "invalid-ab_isize" | ^^^^^^^^^^^^^^^^^^ invalid ABI | - = help: valid ABIs: Rust, C, C-unwind, cdecl, stdcall, stdcall-unwind, fastcall, vectorcall, thiscall, thiscall-unwind, aapcs, win64, sysv64, ptx-kernel, msp430-interrupt, x86-interrupt, amdgpu-kernel, efiapi, avr-interrupt, avr-non-blocking-interrupt, C-cmse-nonsecure-call, system, system-unwind, rust-intrinsic, rust-call, platform-intrinsic, unadjusted + = help: valid ABIs: Rust, C, cdecl, stdcall, fastcall, vectorcall, thiscall, aapcs, win64, sysv64, ptx-kernel, msp430-interrupt, x86-interrupt, amdgpu-kernel, efiapi, avr-interrupt, avr-non-blocking-interrupt, C-cmse-nonsecure-call, system, rust-intrinsic, rust-call, platform-intrinsic, unadjusted error: aborting due to previous error diff --git a/src/test/ui/symbol-names/impl1.rs b/src/test/ui/symbol-names/impl1.rs index d3f74c4a4b7b0..771695330d8bd 100644 --- a/src/test/ui/symbol-names/impl1.rs +++ b/src/test/ui/symbol-names/impl1.rs @@ -74,7 +74,3 @@ fn main() { } }; } - -// FIXME(katie): The 32-bit symbol hash probably needs updating as well, but I'm slightly unsure -// about how to do that. This comment is here so that we don't break the test due to error messages -// including incorrect line numbers. diff --git a/src/test/ui/unwind-abis/feature-gate-c-unwind-enabled.rs b/src/test/ui/unwind-abis/feature-gate-c-unwind-enabled.rs deleted file mode 100644 index 6ff5dbda2d560..0000000000000 --- a/src/test/ui/unwind-abis/feature-gate-c-unwind-enabled.rs +++ /dev/null @@ -1,12 +0,0 @@ -// Test that the "C-unwind" ABI is feature-gated, and *can* be used when the -// `c_unwind` feature gate is enabled. - -// check-pass - -#![feature(c_unwind)] - -extern "C-unwind" fn f() {} - -fn main() { - f(); -} diff --git a/src/test/ui/unwind-abis/feature-gate-c-unwind.rs b/src/test/ui/unwind-abis/feature-gate-c-unwind.rs deleted file mode 100644 index f02a368d4e097..0000000000000 --- a/src/test/ui/unwind-abis/feature-gate-c-unwind.rs +++ /dev/null @@ -1,9 +0,0 @@ -// Test that the "C-unwind" ABI is feature-gated, and cannot be used when the -// `c_unwind` feature gate is not used. - -extern "C-unwind" fn f() {} -//~^ ERROR C-unwind ABI is experimental and subject to change [E0658] - -fn main() { - f(); -} diff --git a/src/test/ui/unwind-abis/feature-gate-c-unwind.stderr b/src/test/ui/unwind-abis/feature-gate-c-unwind.stderr deleted file mode 100644 index f4c785a235f67..0000000000000 --- a/src/test/ui/unwind-abis/feature-gate-c-unwind.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0658]: C-unwind ABI is experimental and subject to change - --> $DIR/feature-gate-c-unwind.rs:4:8 - | -LL | extern "C-unwind" fn f() {} - | ^^^^^^^^^^ - | - = note: see issue #74990 for more information - = help: add `#![feature(c_unwind)]` to the crate attributes to enable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/unwind-abis/feature-gate-stdcall-unwind.rs b/src/test/ui/unwind-abis/feature-gate-stdcall-unwind.rs deleted file mode 100644 index 7d4dc8c9343f1..0000000000000 --- a/src/test/ui/unwind-abis/feature-gate-stdcall-unwind.rs +++ /dev/null @@ -1,13 +0,0 @@ -// ignore-arm stdcall isn't supported -// ignore-aarch64 stdcall isn't supported -// ignore-riscv64 stdcall isn't supported - -// Test that the "stdcall-unwind" ABI is feature-gated, and cannot be used when -// the `c_unwind` feature gate is not used. - -extern "stdcall-unwind" fn f() {} -//~^ ERROR stdcall-unwind ABI is experimental and subject to change [E0658] - -fn main() { - f(); -} diff --git a/src/test/ui/unwind-abis/feature-gate-stdcall-unwind.stderr b/src/test/ui/unwind-abis/feature-gate-stdcall-unwind.stderr deleted file mode 100644 index e3d569f464f87..0000000000000 --- a/src/test/ui/unwind-abis/feature-gate-stdcall-unwind.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0658]: stdcall-unwind ABI is experimental and subject to change - --> $DIR/feature-gate-stdcall-unwind.rs:8:8 - | -LL | extern "stdcall-unwind" fn f() {} - | ^^^^^^^^^^^^^^^^ - | - = note: see issue #74990 for more information - = help: add `#![feature(c_unwind)]` to the crate attributes to enable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/unwind-abis/feature-gate-system-unwind.rs b/src/test/ui/unwind-abis/feature-gate-system-unwind.rs deleted file mode 100644 index 26c2de4e81767..0000000000000 --- a/src/test/ui/unwind-abis/feature-gate-system-unwind.rs +++ /dev/null @@ -1,9 +0,0 @@ -// Test that the "system-unwind" ABI is feature-gated, and cannot be used when -// the `c_unwind` feature gate is not used. - -extern "system-unwind" fn f() {} -//~^ ERROR system-unwind ABI is experimental and subject to change [E0658] - -fn main() { - f(); -} diff --git a/src/test/ui/unwind-abis/feature-gate-system-unwind.stderr b/src/test/ui/unwind-abis/feature-gate-system-unwind.stderr deleted file mode 100644 index 87877336475b4..0000000000000 --- a/src/test/ui/unwind-abis/feature-gate-system-unwind.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0658]: system-unwind ABI is experimental and subject to change - --> $DIR/feature-gate-system-unwind.rs:4:8 - | -LL | extern "system-unwind" fn f() {} - | ^^^^^^^^^^^^^^^ - | - = note: see issue #74990 for more information - = help: add `#![feature(c_unwind)]` to the crate attributes to enable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/unwind-abis/feature-gate-thiscall-unwind.rs b/src/test/ui/unwind-abis/feature-gate-thiscall-unwind.rs deleted file mode 100644 index 2f4cefccc1967..0000000000000 --- a/src/test/ui/unwind-abis/feature-gate-thiscall-unwind.rs +++ /dev/null @@ -1,13 +0,0 @@ -// ignore-arm thiscall isn't supported -// ignore-aarch64 thiscall isn't supported -// ignore-riscv64 thiscall isn't supported - -// Test that the "thiscall-unwind" ABI is feature-gated, and cannot be used when -// the `c_unwind` feature gate is not used. - -extern "thiscall-unwind" fn f() {} -//~^ ERROR thiscall-unwind ABI is experimental and subject to change [E0658] - -fn main() { - f(); -} diff --git a/src/test/ui/unwind-abis/feature-gate-thiscall-unwind.stderr b/src/test/ui/unwind-abis/feature-gate-thiscall-unwind.stderr deleted file mode 100644 index b103bb8d56585..0000000000000 --- a/src/test/ui/unwind-abis/feature-gate-thiscall-unwind.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0658]: thiscall-unwind ABI is experimental and subject to change - --> $DIR/feature-gate-thiscall-unwind.rs:8:8 - | -LL | extern "thiscall-unwind" fn f() {} - | ^^^^^^^^^^^^^^^^^ - | - = note: see issue #74990 for more information - = help: add `#![feature(c_unwind)]` to the crate attributes to enable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0658`.