about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/example/alloc_system.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-04-23 20:17:52 +0200
committerGitHub <noreply@github.com>2024-04-23 20:17:52 +0200
commita760954ca9823797660b07ed830dcf1eb8887e30 (patch)
tree1d57e0e251238ce647e5cc0fcdec21ae4a3e65ce /compiler/rustc_codegen_cranelift/example/alloc_system.rs
parentafb6c4681ab1701e03e03669ec41e8e7c8a495c2 (diff)
parent96152c7df3296c00498a0a8d886b058a09325290 (diff)
downloadrust-a760954ca9823797660b07ed830dcf1eb8887e30.tar.gz
rust-a760954ca9823797660b07ed830dcf1eb8887e30.zip
Rollup merge of #124286 - bjorn3:sync_cg_clif-2024-04-23, r=bjorn3
Subtree sync for rustc_codegen_cranelift

This fixes a crash when compiling the standard library. In addition the Cranelift update fixes all the 128bit int abi incompatibility between cg_clif and cg_llvm.

r? ``@ghost``

``@rustbot`` label +A-codegen +A-cranelift +T-compiler
Diffstat (limited to 'compiler/rustc_codegen_cranelift/example/alloc_system.rs')
-rw-r--r--compiler/rustc_codegen_cranelift/example/alloc_system.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_cranelift/example/alloc_system.rs b/compiler/rustc_codegen_cranelift/example/alloc_system.rs
index e64daf96b01..441f3cd2987 100644
--- a/compiler/rustc_codegen_cranelift/example/alloc_system.rs
+++ b/compiler/rustc_codegen_cranelift/example/alloc_system.rs
@@ -80,7 +80,6 @@ mod platform {
     extern "system" {
         fn GetProcessHeap() -> HANDLE;
         fn HeapAlloc(hHeap: HANDLE, dwFlags: DWORD, dwBytes: SIZE_T) -> LPVOID;
-        fn HeapReAlloc(hHeap: HANDLE, dwFlags: DWORD, lpMem: LPVOID, dwBytes: SIZE_T) -> LPVOID;
         fn HeapFree(hHeap: HANDLE, dwFlags: DWORD, lpMem: LPVOID) -> BOOL;
         fn GetLastError() -> DWORD;
     }
@@ -111,7 +110,7 @@ mod platform {
             allocate_with_flags(layout, HEAP_ZERO_MEMORY)
         }
         #[inline]
-        unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) {
+        unsafe fn dealloc(&self, ptr: *mut u8, _layout: Layout) {
             let header = get_header(ptr);
             let err = HeapFree(GetProcessHeap(), 0, header.0 as LPVOID);
             debug_assert!(err != 0, "Failed to free heap memory: {}", GetLastError());