Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5e311f9

Browse files
committedJul 11, 2024
Auto merge of #127614 - matthiaskrgr:rollup-8geziwi, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #124599 (Suggest borrowing on fn argument that is `impl AsRef`) - #127572 (Don't mark `DEBUG_EVENT` struct as `repr(packed)`) - #127588 (core: Limit remaining f16 doctests to x86_64 linux) - #127591 (Make sure that labels are defined after the primary span in diagnostics) - #127598 (Allows `#[diagnostic::do_not_recommend]` to supress trait impls in suggestions as well) - #127599 (Rename `lazy_cell_consume` to `lazy_cell_into_inner`) - #127601 (check is_ident before parse_ident) - #127605 (Remove extern "wasm" ABI) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 5315cbe + fa3ce50 commit 5e311f9

File tree

45 files changed

+447
-409
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+447
-409
lines changed
 

‎compiler/rustc_target/src/spec/abi/mod.rs

+11-15
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ pub enum Abi {
4848
AvrInterrupt,
4949
AvrNonBlockingInterrupt,
5050
CCmseNonSecureCall,
51-
Wasm,
5251
System {
5352
unwind: bool,
5453
},
@@ -123,7 +122,6 @@ const AbiDatas: &[AbiData] = &[
123122
AbiData { abi: Abi::AvrInterrupt, name: "avr-interrupt" },
124123
AbiData { abi: Abi::AvrNonBlockingInterrupt, name: "avr-non-blocking-interrupt" },
125124
AbiData { abi: Abi::CCmseNonSecureCall, name: "C-cmse-nonsecure-call" },
126-
AbiData { abi: Abi::Wasm, name: "wasm" },
127125
AbiData { abi: Abi::System { unwind: false }, name: "system" },
128126
AbiData { abi: Abi::System { unwind: true }, name: "system-unwind" },
129127
AbiData { abi: Abi::RustIntrinsic, name: "rust-intrinsic" },
@@ -149,6 +147,9 @@ pub fn lookup(name: &str) -> Result<Abi, AbiUnsupported> {
149147
"riscv-interrupt-u" => AbiUnsupported::Reason {
150148
explain: "user-mode interrupt handlers have been removed from LLVM pending standardization, see: https://reviews.llvm.org/D149314",
151149
},
150+
"wasm" => AbiUnsupported::Reason {
151+
explain: "non-standard wasm ABI is no longer supported",
152+
},
152153

153154
_ => AbiUnsupported::Unrecognized,
154155

@@ -241,10 +242,6 @@ pub fn is_stable(name: &str) -> Result<(), AbiDisabled> {
241242
feature: sym::abi_c_cmse_nonsecure_call,
242243
explain: "C-cmse-nonsecure-call ABI is experimental and subject to change",
243244
}),
244-
"wasm" => Err(AbiDisabled::Unstable {
245-
feature: sym::wasm_abi,
246-
explain: "wasm ABI is experimental and subject to change",
247-
}),
248245
_ => Err(AbiDisabled::Unrecognized),
249246
}
250247
}
@@ -287,16 +284,15 @@ impl Abi {
287284
AvrInterrupt => 23,
288285
AvrNonBlockingInterrupt => 24,
289286
CCmseNonSecureCall => 25,
290-
Wasm => 26,
291287
// Cross-platform ABIs
292-
System { unwind: false } => 27,
293-
System { unwind: true } => 28,
294-
RustIntrinsic => 29,
295-
RustCall => 30,
296-
Unadjusted => 31,
297-
RustCold => 32,
298-
RiscvInterruptM => 33,
299-
RiscvInterruptS => 34,
288+
System { unwind: false } => 26,
289+
System { unwind: true } => 27,
290+
RustIntrinsic => 28,
291+
RustCall => 29,
292+
Unadjusted => 30,
293+
RustCold => 31,
294+
RiscvInterruptM => 32,
295+
RiscvInterruptS => 33,
300296
};
301297
debug_assert!(
302298
AbiDatas

‎compiler/rustc_target/src/spec/mod.rs

+1-16
Original file line numberDiff line numberDiff line change
@@ -2608,22 +2608,8 @@ impl DerefMut for Target {
26082608

26092609
impl Target {
26102610
/// Given a function ABI, turn it into the correct ABI for this target.
2611-
pub fn adjust_abi<C>(&self, cx: &C, abi: Abi, c_variadic: bool) -> Abi
2612-
where
2613-
C: HasWasmCAbiOpt,
2614-
{
2611+
pub fn adjust_abi(&self, abi: Abi, c_variadic: bool) -> Abi {
26152612
match abi {
2616-
Abi::C { .. } => {
2617-
if self.arch == "wasm32"
2618-
&& self.os == "unknown"
2619-
&& cx.wasm_c_abi_opt() == WasmCAbi::Legacy
2620-
{
2621-
Abi::Wasm
2622-
} else {
2623-
abi
2624-
}
2625-
}
2626-
26272613
// On Windows, `extern "system"` behaves like msvc's `__stdcall`.
26282614
// `__stdcall` only applies on x86 and on non-variadic functions:
26292615
// https://learn.microsoft.com/en-us/cpp/cpp/stdcall?view=msvc-170
@@ -2676,7 +2662,6 @@ impl Target {
26762662
Msp430Interrupt => self.arch == "msp430",
26772663
RiscvInterruptM | RiscvInterruptS => ["riscv32", "riscv64"].contains(&&self.arch[..]),
26782664
AvrInterrupt | AvrNonBlockingInterrupt => self.arch == "avr",
2679-
Wasm => ["wasm32", "wasm64"].contains(&&self.arch[..]),
26802665
Thiscall { .. } => self.arch == "x86",
26812666
// On windows these fall-back to platform native calling convention (C) when the
26822667
// architecture is not supported.
There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Failed to load comments.