diff options
| author | bors <bors@rust-lang.org> | 2023-08-06 09:29:48 +0000 | 
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-08-06 09:29:48 +0000 | 
| commit | a339ed184f6824c88b9e1f4ea524e09f72908ebf (patch) | |
| tree | a3b4180e7cdc0c368d93989fa59e7a8f21742df8 /compiler/rustc_trait_selection/messages.ftl | |
| parent | 11467b1c2a56bd2fd8272a7413190c814cfcba1f (diff) | |
| parent | e57a89174c2fdafb2d462bf99fde2df92e362f00 (diff) | |
| download | rust-a339ed184f6824c88b9e1f4ea524e09f72908ebf.tar.gz rust-a339ed184f6824c88b9e1f4ea524e09f72908ebf.zip | |
Auto merge of #114528 - dtolnay:globalalloccast, r=cjgillot
Delete some useless casts from global_allocator expansion
These casts are from when #\[global_allocator\] needed to translate back and forth between `*mut u8` and `*mut Opaque`. This should have been cleaned up as part of https://github.com/rust-lang/rust/pull/51241/commits/f6ab74b8e7efed01c1045773b6693f23f6ebd93c.
Difference to code generated by `#[global_allocator] static ALLOCATOR: Allocator = Allocator;`:
```diff
 const _: () = {
     #[rustc_std_internal_symbol]
     unsafe fn __rust_alloc(arg0: usize, arg1: usize) -> *mut u8 {
         ::core::alloc::GlobalAlloc::alloc(
             &ALLOCATOR,
             ::core::alloc::Layout::from_size_align_unchecked(arg0, arg1),
-        ) as *mut u8
+        )
     }
     #[rustc_std_internal_symbol]
     unsafe fn __rust_dealloc(arg0: *mut u8, arg1: usize, arg2: usize) -> () {
         ::core::alloc::GlobalAlloc::dealloc(
             &ALLOCATOR,
-            arg0 as *mut u8,
+            arg0,
             ::core::alloc::Layout::from_size_align_unchecked(arg1, arg2),
         )
     }
     #[rustc_std_internal_symbol]
     unsafe fn __rust_realloc(
         arg0: *mut u8,
         arg1: usize,
         arg2: usize,
         arg3: usize,
     ) -> *mut u8 {
         ::core::alloc::GlobalAlloc::realloc(
             &ALLOCATOR,
-            arg0 as *mut u8,
+            arg0,
             ::core::alloc::Layout::from_size_align_unchecked(arg1, arg2),
             arg3,
-        ) as *mut u8
+        )
     }
     #[rustc_std_internal_symbol]
     unsafe fn __rust_alloc_zeroed(arg0: usize, arg1: usize) -> *mut u8 {
         ::core::alloc::GlobalAlloc::alloc_zeroed(
             &ALLOCATOR,
             ::core::alloc::Layout::from_size_align_unchecked(arg0, arg1),
-        ) as *mut u8
+        )
     }
 };
```
Diffstat (limited to 'compiler/rustc_trait_selection/messages.ftl')
0 files changed, 0 insertions, 0 deletions
