diff options
| author | bors <bors@rust-lang.org> | 2025-06-09 05:21:49 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-06-09 05:21:49 +0000 |
| commit | b6685d748fe4668571c05ba338f61520db6dacc9 (patch) | |
| tree | 6b38c961d88ff70d9d010adb527f354eaea048bb /compiler/rustc_target/src/spec/mod.rs | |
| parent | 334ba812755b974ecc46713fcdd38836b6182746 (diff) | |
| parent | b154e03726ee58029382e1a80ae719e4202bc296 (diff) | |
| download | rust-b6685d748fe4668571c05ba338f61520db6dacc9.tar.gz rust-b6685d748fe4668571c05ba338f61520db6dacc9.zip | |
Auto merge of #141435 - RalfJung:unsupported_calling_conventions, r=workingjubilee
Add (back) `unsupported_calling_conventions` lint to reject more invalid calling conventions This adds back the `unsupported_calling_conventions` lint that was removed in https://github.com/rust-lang/rust/pull/129935, in order to start the process of dealing with https://github.com/rust-lang/rust/issues/137018. Specifically, we are going for the plan laid out [here](https://github.com/rust-lang/rust/issues/137018#issuecomment-2672118326): - thiscall, stdcall, fastcall, cdecl should only be accepted on x86-32 - vectorcall should only be accepted on x86-32 and x86-64 The difference to the status quo is that: - We stop accepting stdcall, fastcall on targets that are windows && non-x86-32 (we already don't accept these on targets that are non-windows && non-x86-32) - We stop accepting cdecl on targets that are non-x86-32 - (There is no difference for thiscall, this was already a hard error on non-x86-32) - We stop accepting vectorcall on targets that are windows && non-x86-* Vectorcall is an unstable ABI so we can just make this a hard error immediately. The others are stable, so we emit the `unsupported_calling_conventions` forward-compat lint. I set up the lint to show up in dependencies via cargo's future-compat report immediately, but we could also make it show up just for the local crate first if that is preferred. try-job: i686-msvc-1 try-job: x86_64-msvc-1 try-job: test-various
Diffstat (limited to 'compiler/rustc_target/src/spec/mod.rs')
| -rw-r--r-- | compiler/rustc_target/src/spec/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index 1726de4d471..6ceb5e80f21 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -62,7 +62,7 @@ mod abi_map; mod base; mod json; -pub use abi_map::AbiMap; +pub use abi_map::{AbiMap, AbiMapping}; pub use base::apple; pub use base::avr::ef_avr_arch; |
