Skip to content

Commit 43e32b5

Browse files
committed
Remove comment about a branch being optimized out, fix rust-lang#45831
Most often, this code is used through the `std::heap::Heap` and `#[gloabal_allocator]` indirection, so this branch is not optimized out anymore.
1 parent 2dd268b commit 43e32b5

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/liballoc_jemalloc/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ mod contents {
7272
const MALLOCX_ZERO: c_int = 0x40;
7373

7474
// The minimum alignment guaranteed by the architecture. This value is used to
75-
// add fast paths for low alignment values. In practice, the alignment is a
76-
// constant at the call site and the branch will be optimized out.
75+
// add fast paths for low alignment values.
7776
#[cfg(all(any(target_arch = "arm",
7877
target_arch = "mips",
7978
target_arch = "powerpc")))]

src/liballoc_system/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
#![rustc_alloc_kind = "lib"]
2626

2727
// The minimum alignment guaranteed by the architecture. This value is used to
28-
// add fast paths for low alignment values. In practice, the alignment is a
29-
// constant at the call site and the branch will be optimized out.
28+
// add fast paths for low alignment values.
3029
#[cfg(all(any(target_arch = "x86",
3130
target_arch = "arm",
3231
target_arch = "mips",

0 commit comments

Comments
 (0)