diff options
| author | bors <bors@rust-lang.org> | 2022-08-21 19:05:18 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-08-21 19:05:18 +0000 |
| commit | c0941dfb5a7d07ef2d70cc54d319669d9d6f6c01 (patch) | |
| tree | 37525d0391e25a800121ccc4dcaf7b29d50fb86f /compiler/rustc_codegen_gcc/example/alloc_system.rs | |
| parent | 650bff80a623e17675ac72ae4d62ed200a4a3568 (diff) | |
| parent | 5ba68df9884274ab3f8793effda72c2b62990804 (diff) | |
| download | rust-c0941dfb5a7d07ef2d70cc54d319669d9d6f6c01.tar.gz rust-c0941dfb5a7d07ef2d70cc54d319669d9d6f6c01.zip | |
Auto merge of #100847 - matthiaskrgr:rollup-0ga531s, r=matthiaskrgr
Rollup of 11 pull requests Successful merges: - #100556 (Clamp Function for f32 and f64) - #100663 (Make slice::reverse const) - #100697 ( Minor syntax and formatting update to doc comment on `find_vtable_types_for_unsizing`) - #100760 (update test for LLVM change) - #100761 (some general mir typeck cleanup) - #100775 (rustdoc: Merge source code pages HTML elements together v2) - #100813 (Add `/build-rust-analyzer/` to .gitignore) - #100821 (Make some docs nicer wrt pointer offsets) - #100822 (Replace most uses of `pointer::offset` with `add` and `sub`) - #100839 (Make doc for stdin field of process consistent) - #100842 (Add diagnostics lints to `rustc_transmute` module (zero diags)) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_gcc/example/alloc_system.rs')
| -rw-r--r-- | compiler/rustc_codegen_gcc/example/alloc_system.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_gcc/example/alloc_system.rs b/compiler/rustc_codegen_gcc/example/alloc_system.rs index 5f66ca67f2d..89661918d05 100644 --- a/compiler/rustc_codegen_gcc/example/alloc_system.rs +++ b/compiler/rustc_codegen_gcc/example/alloc_system.rs @@ -156,7 +156,7 @@ mod platform { struct Header(*mut u8); const HEAP_ZERO_MEMORY: DWORD = 0x00000008; unsafe fn get_header<'a>(ptr: *mut u8) -> &'a mut Header { - &mut *(ptr as *mut Header).offset(-1) + &mut *(ptr as *mut Header).sub(1) } unsafe fn align_ptr(ptr: *mut u8, align: usize) -> *mut u8 { let aligned = ptr.add(align - (ptr as usize & (align - 1))); |
