mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Print similar-layout procs when borrow fails to find one
This commit is contained in:
parent
4cdb8c0cd7
commit
00ff6dcad7
1 changed files with 8 additions and 2 deletions
|
@ -162,9 +162,15 @@ impl<'a> DeclarationToIndex<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let similar = self
|
||||||
|
.elements
|
||||||
|
.iter()
|
||||||
|
.filter_map(|((s, lay), _)| if *s == needle_symbol { Some(lay) } else { None })
|
||||||
|
.collect::<std::vec::Vec<_>>();
|
||||||
unreachable!(
|
unreachable!(
|
||||||
"symbol/layout {:?} {:#?} combo must be in DeclarationToIndex",
|
"symbol/layout {:?} {:#?} combo must be in DeclarationToIndex\nHowever {} similar layouts were found:\n{:#?}",
|
||||||
needle_symbol, needle_layout
|
needle_symbol, needle_layout, similar.len(), similar
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue