mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-01 21:40:58 +00:00
added error tip
This commit is contained in:
parent
0d9db5bf2d
commit
15a7ed2e95
1 changed files with 5 additions and 1 deletions
|
|
@ -393,7 +393,11 @@ impl<'state, 'a> State<'state, 'a> {
|
|||
let borrow_signature =
|
||||
match borrow_signatures.procs.get(&(name.name(), proc_layout)) {
|
||||
Some(s) => s,
|
||||
None => unreachable!("no borrow signature for {name:?} layout"),
|
||||
None => unreachable!(
|
||||
"\n\tNo borrow signature for {name:?} layout.\n\n\t\
|
||||
Tip: This can happen when you call a function with less arguments than it expects.\n\t\
|
||||
Like `Arg.list!` instead of `Arg.list! {{}}`"
|
||||
)
|
||||
};
|
||||
|
||||
for (argument, ownership) in arguments.iter().zip(borrow_signature.iter()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue