about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src/optimize/code_layout.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-03-07 02:36:07 +0000
committerbors <bors@rust-lang.org>2021-03-07 02:36:07 +0000
commit66ec64ccf31883cd2c28d045912a76179c0c6ed2 (patch)
treec91086d0e3c6cff3ed331adc66931e17281701f8 /compiler/rustc_codegen_cranelift/src/optimize/code_layout.rs
parentdfe519b344b60e54a2028d3366ca366a228537e3 (diff)
parent6220e00ea9a790fb83cf391e2093c260db6d47a1 (diff)
downloadrust-66ec64ccf31883cd2c28d045912a76179c0c6ed2.tar.gz
rust-66ec64ccf31883cd2c28d045912a76179c0c6ed2.zip
Auto merge of #82851 - JohnTitor:rollup-me5ko8g, r=JohnTitor
Rollup of 13 pull requests

Successful merges:

 - #77916 (Change built-in kernel targets to be os = none throughout)
 - #82130 (Make some Option, Result methods unstably const)
 - #82292 (Prevent specialized ZipImpl from calling `__iterator_get_unchecked` twice with the same index)
 - #82402 (Remove RefCell around `module_trait_cache`)
 - #82592 (Improve transmute docs with further clarifications)
 - #82651 (Cleanup rustdoc warnings)
 - #82720 (Fix diagnostic suggests adding type `[type error]`)
 - #82751 (improve offset_from docs)
 - #82793 (Move some tests to more suitable subdirs)
 - #82803 (rustdoc: Add an unstable option to print all unversioned files)
 - #82808 (Sync rustc_codegen_cranelift)
 - #82822 (Fix typo)
 - #82837 (tweak MaybeUninit docs)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/optimize/code_layout.rs')
-rw-r--r--compiler/rustc_codegen_cranelift/src/optimize/code_layout.rs10
1 files changed, 2 insertions, 8 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/optimize/code_layout.rs b/compiler/rustc_codegen_cranelift/src/optimize/code_layout.rs
index f02732014d1..ca9ff15ec10 100644
--- a/compiler/rustc_codegen_cranelift/src/optimize/code_layout.rs
+++ b/compiler/rustc_codegen_cranelift/src/optimize/code_layout.rs
@@ -15,10 +15,7 @@ pub(super) fn optimize_function(ctx: &mut Context, cold_blocks: &EntitySet<Block
     // bytecodealliance/cranelift#1339 is implemented.
 
     let mut block_insts = FxHashMap::default();
-    for block in cold_blocks
-        .keys()
-        .filter(|&block| cold_blocks.contains(block))
-    {
+    for block in cold_blocks.keys().filter(|&block| cold_blocks.contains(block)) {
         let insts = ctx.func.layout.block_insts(block).collect::<Vec<_>>();
         for &inst in &insts {
             ctx.func.layout.remove_inst(inst);
@@ -28,10 +25,7 @@ pub(super) fn optimize_function(ctx: &mut Context, cold_blocks: &EntitySet<Block
     }
 
     // And then append them at the back again.
-    for block in cold_blocks
-        .keys()
-        .filter(|&block| cold_blocks.contains(block))
-    {
+    for block in cold_blocks.keys().filter(|&block| cold_blocks.contains(block)) {
         ctx.func.layout.append_block(block);
         for inst in block_insts.remove(&block).unwrap() {
             ctx.func.layout.append_inst(inst, block);