diff --git a/src/transform/common.rs b/src/transform/common.rs index e39d149..71a325d 100644 --- a/src/transform/common.rs +++ b/src/transform/common.rs @@ -83,14 +83,18 @@ impl Default for CheckLevel { } pub(crate) fn check_mergeable_fieldsets( + a_name: &str, a: &FieldSet, + b_name: &str, b: &FieldSet, level: CheckLevel, ) -> anyhow::Result<()> { if let Err(e) = check_mergeable_fieldsets_inner(a, b, level) { bail!( - "Cannot merge fieldsets.\nfirst: {:#?}\nsecond: {:#?}\ncause: {:?}", + "Cannot merge fieldsets.\nfirst: {} {:#?}\nsecond: {} {:#?}\ncause: {:?}", + a_name, a, + b_name, b, e ) diff --git a/src/transform/merge_fieldsets.rs b/src/transform/merge_fieldsets.rs index 6e1cbfa..380f420 100644 --- a/src/transform/merge_fieldsets.rs +++ b/src/transform/merge_fieldsets.rs @@ -51,7 +51,7 @@ impl MergeFieldsets { for id in &ids { let fs2 = ir.fieldsets.get(id).unwrap(); - check_mergeable_fieldsets(&fs, fs2, self.check)?; + check_mergeable_fieldsets(&main_id, &fs, id, fs2, self.check)?; } for id in &ids {