]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_codegen_cranelift/src/debuginfo/emit.rs
Merge commit '9a0c32934ebe376128230aa8da3275697b2053e7' into sync_cg_clif-2021-03-05
[rust.git] / compiler / rustc_codegen_cranelift / src / debuginfo / emit.rs
index 6160f9b78d8b3a6d9cd3cefde854f4ca60813f67..6018eefcd42fb4ae4b196729bed6ecbe19d33dc8 100644 (file)
@@ -14,10 +14,7 @@ pub(crate) fn emit<P: WriteDebugInfo>(&mut self, product: &mut P) {
         let unit_range_list_id = self.dwarf.unit.ranges.add(self.unit_range_list.clone());
         let root = self.dwarf.unit.root();
         let root = self.dwarf.unit.get_mut(root);
-        root.set(
-            gimli::DW_AT_ranges,
-            AttributeValue::RangeListRef(unit_range_list_id),
-        );
+        root.set(gimli::DW_AT_ranges, AttributeValue::RangeListRef(unit_range_list_id));
 
         let mut sections = Sections::new(WriterRelocate::new(self.endian));
         self.dwarf.write(&mut sections).unwrap();
@@ -66,10 +63,7 @@ pub(super) struct WriterRelocate {
 
 impl WriterRelocate {
     pub(super) fn new(endian: RunTimeEndian) -> Self {
-        WriterRelocate {
-            relocs: Vec::new(),
-            writer: EndianVec::new(endian),
-        }
+        WriterRelocate { relocs: Vec::new(), writer: EndianVec::new(endian) }
     }
 
     /// Perform the collected relocations to be usable for JIT usage.
@@ -85,9 +79,7 @@ pub(super) fn relocate_for_jit(mut self, jit_module: &cranelift_jit::JITModule)
                         cranelift_module::FuncId::from_u32(sym.try_into().unwrap()),
                     );
                     let val = (addr as u64 as i64 + reloc.addend) as u64;
-                    self.writer
-                        .write_udata_at(reloc.offset as usize, val, reloc.size)
-                        .unwrap();
+                    self.writer.write_udata_at(reloc.offset as usize, val, reloc.size).unwrap();
                 }
             }
         }