diff --git a/cranelift/faerie/src/backend.rs b/cranelift/faerie/src/backend.rs index be2ad792cc..8fae42a0b4 100644 --- a/cranelift/faerie/src/backend.rs +++ b/cranelift/faerie/src/backend.rs @@ -215,7 +215,11 @@ impl Backend for FaerieBackend { } = data_ctx.description(); if let Some((segment, section)) = custom_segment_section { - return Err(cranelift_module::ModuleError::Backend(anyhow::anyhow!("Custom section not supported by cranelift-faerie: `{}:{}`", segment, section))); + return Err(cranelift_module::ModuleError::Backend(anyhow::anyhow!( + "Custom section not supported by cranelift-faerie: `{}:{}`", + segment, + section + ))); } for &(offset, id) in function_relocs { diff --git a/cranelift/module/src/data_context.rs b/cranelift/module/src/data_context.rs index 56e8b36024..bca8471a77 100644 --- a/cranelift/module/src/data_context.rs +++ b/cranelift/module/src/data_context.rs @@ -97,10 +97,7 @@ impl DataContext { /// Override the segment/section for data, only supported on Object backend pub fn set_segment_section(&mut self, seg: &str, sec: &str) { - self.description.custom_segment_section = Some(( - seg.to_owned(), - sec.to_owned(), - )) + self.description.custom_segment_section = Some((seg.to_owned(), sec.to_owned())) } /// Declare an external function import. diff --git a/cranelift/object/src/backend.rs b/cranelift/object/src/backend.rs index 5d0c0d0060..4ec6522061 100644 --- a/cranelift/object/src/backend.rs +++ b/cranelift/object/src/backend.rs @@ -284,7 +284,9 @@ impl Backend for ObjectBackend { self.object.section_id(section_kind) } else { if tls { - return Err(cranelift_module::ModuleError::Backend(anyhow::anyhow!("Custom section not supported for TLS"))); + return Err(cranelift_module::ModuleError::Backend(anyhow::anyhow!( + "Custom section not supported for TLS" + ))); } let (seg, sec) = &custom_segment_section.as_ref().unwrap(); self.object.add_section(