Skip to content

Commit

Permalink
print names of nonmergeable fieldsets.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirbaio committed Aug 11, 2024
1 parent 5e98229 commit a349968
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/transform/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
2 changes: 1 addition & 1 deletion src/transform/merge_fieldsets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a349968

Please sign in to comment.