Rust fmt fixes
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user