about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-09-21 05:31:01 +0000
committerbors <bors@rust-lang.org>2020-09-21 05:31:01 +0000
commita409a233e02b1864d1b76495a1f946bb56c7aeb2 (patch)
tree0898049b3dd32714fea96f03a843b6b532ad329b /compiler/rustc_codegen_llvm/src
parent70148d7b3161912381b1a5c427c3a690e12c5b24 (diff)
parentca15e9d8a11e7c25eb85930d1da3009647c1680e (diff)
downloadrust-a409a233e02b1864d1b76495a1f946bb56c7aeb2.tar.gz
rust-a409a233e02b1864d1b76495a1f946bb56c7aeb2.zip
Auto merge of #75974 - SkiFire13:peekmut-opt-sift, r=LukasKalbertodt
Avoid useless sift_down when std::collections::binary_heap::PeekMut is never mutably dereferenced

If `deref_mut` is never called then it's not possible for the element to be mutated without internal mutability, meaning there's no need to call `sift_down`.

This could be a little improvement in cases where you want to mutate the biggest element of the heap only if it satisfies a certain predicate that needs only read access to the element.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions