Derive Debug for FaerieProduct (#1252)

This allows using Result::unwrap_err for `Result`s with FaerieProducts.
This commit is contained in:
Joshua Nelson
2019-11-25 07:46:15 -05:00
committed by Till Schneidereit
parent bc9f05e5e2
commit b9296b792d
2 changed files with 4 additions and 0 deletions

View File

@@ -322,6 +322,7 @@ impl Backend for FaerieBackend {
/// This is the output of `Module`'s /// This is the output of `Module`'s
/// [`finish`](../cranelift_module/struct.Module.html#method.finish) function. /// [`finish`](../cranelift_module/struct.Module.html#method.finish) function.
/// It provides functions for writing out the object file to memory or a file. /// It provides functions for writing out the object file to memory or a file.
#[derive(Debug)]
pub struct FaerieProduct { pub struct FaerieProduct {
/// Faerie artifact with all functions, data, and links from the module defined /// Faerie artifact with all functions, data, and links from the module defined
pub artifact: faerie::Artifact, pub artifact: faerie::Artifact,

View File

@@ -4,6 +4,7 @@
use cranelift_codegen::{binemit, ir}; use cranelift_codegen::{binemit, ir};
/// Record of the arguments cranelift passes to `TrapSink::trap` /// Record of the arguments cranelift passes to `TrapSink::trap`
#[derive(Debug)]
pub struct FaerieTrapSite { pub struct FaerieTrapSite {
/// Offset into function /// Offset into function
pub offset: binemit::CodeOffset, pub offset: binemit::CodeOffset,
@@ -14,6 +15,7 @@ pub struct FaerieTrapSite {
} }
/// Record of the trap sites for a given function /// Record of the trap sites for a given function
#[derive(Debug)]
pub struct FaerieTrapSink { pub struct FaerieTrapSink {
/// Name of function /// Name of function
pub name: String, pub name: String,
@@ -45,6 +47,7 @@ impl binemit::TrapSink for FaerieTrapSink {
} }
/// Collection of all `FaerieTrapSink`s for the module /// Collection of all `FaerieTrapSink`s for the module
#[derive(Debug)]
pub struct FaerieTrapManifest { pub struct FaerieTrapManifest {
/// All `FaerieTrapSink` for the module /// All `FaerieTrapSink` for the module
pub sinks: Vec<FaerieTrapSink>, pub sinks: Vec<FaerieTrapSink>,